AutoHotkey Community

It is currently May 27th, 2012, 7:44 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Blat DLL Usage
PostPosted: June 30th, 2006, 10:23 pm 
Offline

Joined: September 2nd, 2004, 1:08 am
Posts: 124
Location: Sunnyvale
Blat is a small, efficient SMTP command line mailer for Windows. It is the SMTP *sending* part of an eMail User Agent (MUA) or eMail client. As such, Blat sends eMail via SMTP (or internet eMail) from the command line.

Link to Blat home page:
http://www.blat.net/

Syntax:
http://www.blat.net/syntax/syntax.html

*Very* simple blat.dll script that sends the ahk script and blat.dll to the "addy" email address:
Code:
teststring:="blat-test.ahk -t addy@whatever.com -s test -base64 -attach blat.dll -f youremailaddy@whatever.com -server smtpserver.pub.net"
i:=DllCall("blat.dll\Send",str,teststring)


You can get the dll from here:
http://www.geocities.com/toby_korn/blat/

I created the scipt with the intention of sending the output of another ahk script to a couple of email addresses.

_________________
I am he of whom he speaks!


Last edited by Atomhrt on July 2nd, 2006, 3:50 pm, edited 3 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 1st, 2006, 2:39 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
I guess its function is to send a given file to a given email address. Right? Could you add a little explanation of the options or a link, where we can find them? An example application would be also nice. Many of us don't know why we would email files from an AHK script.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2006, 3:33 pm 
Offline

Joined: September 2nd, 2004, 1:08 am
Posts: 124
Location: Sunnyvale
Laszlo wrote:
I guess its function is to send a given file to a given email address. Right? Could you add a little explanation of the options or a link, where we can find them? An example application would be also nice. Many of us don't know why we would email files from an AHK script.


Sorry about that. I was in a hurry when I made the original post. I've updated it with more info. Hope that helps.

_________________
I am he of whom he speaks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2006, 10:45 pm 
Offline

Joined: July 25th, 2006, 7:37 pm
Posts: 490
Location: Midwest, USA
Laslo, I use the email sending capabilities of blat in a couple of my scripts, particularly my Server Status Check script. It sends me an email to my cell phone, which comes across as a SMS text message. Rather handy for knowing when servers appear to not be responding.

Or in the case of another custom script, it pages me via the email feature of blat, to let me know when a particular program failed to restart properly.

These notifications are handy as it lets me know I need to look into what is going on. The same principle would be good for just normal email notifications, for followup purposes. :)

_________________
SilverEdge78


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2006, 10:56 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
What is the benefit of using the dll over the command line tool?
I used the CLI in one of my scripts and it works ok.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 27th, 2006, 12:05 am 
Offline

Joined: July 25th, 2006, 7:37 pm
Posts: 490
Location: Midwest, USA
Now that I cannot answer. I use the CLI myself. I do not care for DllCalls if I do not have to use them. I was merely addressing Laszlo's question as to why someone would want to email from an AHK script. :)

_________________
SilverEdge78


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 27th, 2006, 2:48 am 
Offline

Joined: September 2nd, 2004, 1:08 am
Posts: 124
Location: Sunnyvale
toralf wrote:
What is the benefit of using the dll over the command line tool?
I used the CLI in one of my scripts and it works ok.


Because you are not involving the command shell (cmd.exe) for one thing. An example of why this may be important... A bat file that ran fine on lots of other machines was bombing on three. We finally tracked it down to a registry setting that the user had set in the Command Processor tree. We decided not to use a bat file for the tool.

_________________
I am he of whom he speaks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 27th, 2006, 3:36 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
Thanks Atomhrt and silveredge78 for the explanations. I am convinced now that Blat dll is a useful tool. Especially, sending an SMS automatically can be very helpful.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 30th, 2006, 7:52 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Quote:
I was merely addressing Laszlo's question as to why someone would want to email from an AHK script.

What kind of question is this ?
There are number of uses...

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 30th, 2006, 8:00 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
majkinetor wrote:
There are number of uses...
It was interesting to here about a few. Why don't you tell about your application? Most of us use a single computer and our employers don't allow sending automated emails. Some people's first reaction about auto-sending emails could be that it is for spam.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 30th, 2006, 8:32 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Only few:

1. Reporting GUI for bugs
2. Automatic annoucement of certain events :
    2.1. send ip on starting the machine
    2.2. send application logs
    2.3. birthday robots

3. Send spams :)
4. Make the people nervous 8)
5. order pica for your breakfast at scheduled time
6. ....

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 1st, 2006, 10:41 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Other use I though of when I was searching for a job: as last resort, when you discover lot of potential emplyers just don't read your messages, don't answer to them, or use robots to answer them:
Send automated e-mail job applications.
Not dumb spam, but fill in a base of data on the targetted job, and send the more or less personnalized e-mails.
At the end, I had a standard e-mail which I adjusted slightly to the profile anyway... :-)

Of course, for really interesting offers, I spent more time to polish the message... ;-)

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 1st, 2006, 1:43 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
So you see Laszlo, from ordering a piza to find a new job... :P

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 1st, 2006, 5:47 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
It was a long time ago... I wanted to apply for many jobs (it was 170 at the end), so I wrote a TeX macro with input parameters like the job title, reference code, the contact person with the proper salutation, address, my expertise, etc. It printed professional looking letters, which I signed and mailed. (Still, I got only a handful of replies.)

The last time I did a similar process with Word macros. I could create a good looking application email in seconds, but before I sent them, I had to check for inconsistencies, formatting, etc. The actual sending of the email was the least of the problems, you can do it directly from Word. However, with Blat and an AHK script (hotkey stripping the email address and send the selected text after saving it for later reference), this last step could have been simplified. I said I was already convinced automatic email sending is useful.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 1st, 2006, 7:34 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Ok, so we are all very happy about this dll. :D

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: nothing and 11 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group