AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Blat DLL Usage
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Atomhrt



Joined: 02 Sep 2004
Posts: 128
Location: Sunnyvale

PostPosted: Fri Jun 30, 2006 10:23 pm    Post subject: Blat DLL Usage Reply with quote

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 Sun Jul 02, 2006 3:50 pm; edited 3 times in total
Back to top
View user's profile Send private message
Laszlo



Joined: 14 Feb 2005
Posts: 4002
Location: Pittsburgh

PostPosted: Sat Jul 01, 2006 2:39 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Atomhrt



Joined: 02 Sep 2004
Posts: 128
Location: Sunnyvale

PostPosted: Sun Jul 02, 2006 3:33 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
silveredge78



Joined: 25 Jul 2006
Posts: 380
Location: Midwest, USA

PostPosted: Tue Sep 26, 2006 10:45 pm    Post subject: Reply with quote

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. Smile
_________________
SilverEdge78
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Tue Sep 26, 2006 10:56 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
silveredge78



Joined: 25 Jul 2006
Posts: 380
Location: Midwest, USA

PostPosted: Wed Sep 27, 2006 12:05 am    Post subject: Reply with quote

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. Smile
_________________
SilverEdge78
Back to top
View user's profile Send private message
Atomhrt



Joined: 02 Sep 2004
Posts: 128
Location: Sunnyvale

PostPosted: Wed Sep 27, 2006 2:48 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
Laszlo



Joined: 14 Feb 2005
Posts: 4002
Location: Pittsburgh

PostPosted: Wed Sep 27, 2006 3:36 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 3624
Location: Belgrade

PostPosted: Sat Sep 30, 2006 7:52 pm    Post subject: Reply with quote

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...
_________________
Back to top
View user's profile Send private message MSN Messenger
Laszlo



Joined: 14 Feb 2005
Posts: 4002
Location: Pittsburgh

PostPosted: Sat Sep 30, 2006 8:00 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 3624
Location: Belgrade

PostPosted: Sat Sep 30, 2006 8:32 pm    Post subject: Reply with quote

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 Smile
4. Make the people nervous Cool
5. order pica for your breakfast at scheduled time
6. ....
_________________
Back to top
View user's profile Send private message MSN Messenger
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Sun Oct 01, 2006 10:41 am    Post subject: Reply with quote

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... Smile

Of course, for really interesting offers, I spent more time to polish the message... Wink
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 3624
Location: Belgrade

PostPosted: Sun Oct 01, 2006 1:43 pm    Post subject: Reply with quote

So you see Laszlo, from ordering a piza to find a new job... Razz
_________________
Back to top
View user's profile Send private message MSN Messenger
Laszlo



Joined: 14 Feb 2005
Posts: 4002
Location: Pittsburgh

PostPosted: Sun Oct 01, 2006 5:47 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 3624
Location: Belgrade

PostPosted: Sun Oct 01, 2006 7:34 pm    Post subject: Reply with quote

Ok, so we are all very happy about this dll. Very Happy
_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group