Loading Facebook Comments ...

2 thoughts on “How to send emails from a batch file in Windows”

  1. @ Pedro

    Your activity sounds fishy…
    However, as per blat’s documentation you can use the option -i to insert your “from address”.
    You sending command will become:
    blat -server "mail.some-domain.com" -port 587 -i yurbypedro@hotmail.com -u emailUseraccount -pw email-password -f sender@some-domain.com -noh -to %RecipientList% -subject "Reports %Filetosend%" -body "Attached you will find your Jet Report" -attach "%OutputPath%%date%-%Filetosend%.zip"

    Note that I didn’t use a variable for this, but you can look at the batch code and insert it.

    I hope this helps…

Leave a Reply

Your email address will not be published. Required fields are marked *