SENDMAIL Send e-mail message to one or more recipients |
Top Previous Next |
This command sends an e-mail message previously created with the CREATEMAIL command via a SMTP e-mail server to one or more recipients. All of the arguments to this command are required, however [ to name ] may be an empty string.
The same message is sent each time SENDMAIL is called unless CREATEMAIL is called again to change the message.
Consider the following example where an e-mail message is created and then sent.
;; create the message SET from = "Acme Widget Co. Sales" SET email = "[email protected]" SET subj = "Thanks for your order!" SET body = "We appreciate your business." SET attach = "" CREATEMAIL from email subj body attach ;; send the message SENDMAIL "120.33.13.10" "Joe Blow" "[email protected]"
Consider the following example where authentication is required on the SMTP server (not all mail servers will require authentication.)
SET server = "smtp.mail.server" SET to = "Ray Johnson" SET email = "[email protected]" SENDMAIL server to email /user=smtpid /pw=smtppw
Consider the following example where the same message is sent to three recipients.
SET server = "smtp.mail.server" SET to = "Ray Johnson,Dick Martin,Dan Rowan" SET email = "[email protected],[email protected],[email protected]" SENDMAIL server to email
When multiple messages are sent in this way, each message is sent separately. Do not confuse this with sending CC or BCC copies.
Important To cut down on spam, some mail servers now require that the email address in the FROM line match an existing mailbox on the server. If your mail server returns an error when you call the SENDMAIL command, please check the FROM email address. Also, to fight botnets, some Internet Service Providers are now blocking outbound traffic on port 25 by default so you may need to contact your network administrator or ISP before using an external mail server
Here is an example using the /ssl and /port options together:
SENDMAIL "mail.domain.com" "" "[email protected]" /user="joeb" /pw="secret" /port=587 /ssl
If you encounter errors when using this command you may be able to discover the cause by examining the Trace Log and looking for problems in the SMTP conversation between Robo-FTP and your email server. Also, because malware infections are so often to send spam, your virus scanner may block Robo-FTP's ability to send email. This possibility is worth exploring if Robo-FTP reports that the SMTP connection or socket was closed unexpectedly.
Related command(s): CREATEMAIL, GETMAIL, MAILTO See also: Sending and Receiving E-mail, Sending SMS text messages |