Main Area and Open Discussion > General Software Discussion
Send email from cmdline !
x16wda:
Blat really was tricky, having one to install all the profile and still not able to work with the commands.
Any suggestion would be great.
-hulkbuster (May 14, 2014, 12:02 PM)
--- End quote ---
Actually you should be able to put all the required information on one command line, although installing the server and from info in the profile makes it easier for subsequent use. But the info you would need to use Blat would be exactly the same info you would need to set up an email client like Outlook or Thunderbird or whatever - account name, ISP servers, password, etc - plus what you would need for your email - subject, recipient, body.
One of the things you need to know is the name of either your email smtp server or your recipient's email server. Yours is preferable, the recipient's server might block your email because it would (probably) be coming from a residential or dynamic address. Your own ISP would be more likely to allow an email from one of its own addresses to run through its servers.
To send a text file named "mymessage.txt" as the body of the message to [email protected], you'd do something like this:
blat.exe mymessage.txt -to [email protected] -from [email protected] -subject "This is an email" -server smtp-server.location.rr.com -u [email protected] -pw hulkbusterpassword -debug
The -u and -pw options might be needed for authentication; your ISP would want to make sure you have an account. The -debug option should show you the conversation between Blat and your ISP, which can be extremely useful for troubleshooting. I just used the Roadrunner server name pattern for this example.
Ath:
For TLS support the command i gave was:
--- ---SendEmail -f [email protected] -t [email protected] -s smtp.gmail.com:587 -xu [email protected] -xp xxxxx -u "Hello their" -m "How are you." -o tls=yesThe error message i got was " SMTP-AUTH: Authentication to smtp.gmail.com:587 failed. "
-hulkbuster (May 14, 2014, 12:02 PM)
--- End quote ---
Are you sure you want to use this: -xu [email protected] ? Shouldn't that be like: -xu [email protected]
jpfx:
meh, just sayin explaining how to use command line e-mail tools for yahoo or gmail is too close to explaining how to send spam for me to be comfortable.
rjbull:
the info you would need to use Blat would be exactly the same info you would need to set up an email client like Outlook or Thunderbird or whatever-x16wda (May 14, 2014, 08:14 PM)
--- End quote ---
Agreed, though as I don't know much about it, I've found subtle differences between clients, anti-spam programs etc. hair-tearing, especially in their terminology regarding connection type and authentication.
hulkbuster:
To send a text file named "mymessage.txt" as the body of the message to [email protected], you'd do something like this:
blat.exe mymessage.txt -to [email protected] -from [email protected] -subject "This is an email" -server smtp-server.location.rr.com -u [email protected] -pw hulkbusterpassword -debug
The -u and -pw options might be needed for authentication; your ISP would want to make sure you have an account. The -debug option should show you the conversation between Blat and your ISP, which can be extremely useful for troubleshooting. I just used the Roadrunner server name pattern for this example.
-x16wda (May 14, 2014, 08:14 PM)
--- End quote ---
Is this process of correct first to install:
--- ---Blat -install <server addr> <sender's addr> [<try>[<port>[<profile>]]]
Blat -install smtp.gmail.com [email protected] 2 587 hulk
Sending an email:
--- ---Blat -install <server addr> <sender's addr> [<try>[<port>[<profile>]]]
blat.exe mymessage.txt -to [email protected] -from [email protected] -subject "This is an email" -server smtp-server.location.rr.com -u [email protected] -pw hulkbusterpassword -debug
or
blat.exe c:\a.txt -to [email protected] -from [email protected] -subject "This is an email" -server smtp-server.location.rr.com -u [email protected] -pw hulkbusterpassword -debug
Navigation
[0] Message Index
[*] Previous page
Go to full version