Wednesday, January 11, 2012

How to sent mail with attachment using batch

Sending mail using batch
Sending mail using Blat
Sending attachemt using blat
Sending mail with attachment using batch file

Blat with attachment script

For this purpose I use a command line utility which is not an installer but only an exe file.You will be able to download this from
For this script the minimum requirement is a mail rely server
syntax
Sending mail without attachment
blat "c:\some.txt" -t someone@somwhere.com -s "Some Subject" -i fromaddress@somedomain.com -f "replyaddress@somedomain.com" -q -server "your.relay.server.com
Here Some.txt is the message body which can be your Signature with message
Sending mail with attachment
Syntax
blat "c:\some.txt" -t someone@somwhere.com -s "Some Subject" -i fromaddress@somedomain.com -f "replyaddress@somedomain.com" -attach myattachment.jpg -mime -q -server "your.relay.server.com
Where myattachment.jpg is the jpg attachment

No comments:

Post a Comment