SendSmtpFileMessage

From IRON Test Suite
Jump to navigation Jump to search

DESCRIPTION

This command sends a specified Email message to SMTP server on the specified GSM port. It requires that Data session on the specified GSM port be already up. Message is sent with the content from the specified file that should contain formatted SMTP data including headers (see RFC 2822). If any of required parameters is not needed it can be specified as NULL string (""). Sender Email address will be used in "MAIL From" SMTP message, Recipient Email Address will be used in "RCPT To". Optional User Name and Password can be specified if authentication is required. Optional SSL flag can be added at the end of this command. Command waits until Email message is sent or general timeout expired.


COMMAND

Command Input arguments Returns
SendSmtpFileMessage Port index, SMTP Server IP Address or Host Name, [:Peer Port], Sender Name, Sender Email Address, Recepient Email Address, CC Email Address, BCC Email Address, Subject, Message File Path, [User Name, Password and SSL flag] In the case of error, Error Code

All error messages are available in Data Commands Status Message list


EXAMPLE

~# SendSmtpFileMessage 0 "smtp.iqsim.com" "pierre@iqsim.com" "dupon@gmail.com" "/var/tmp/test.eml"
EMAIL MESSAGE SENT

~# SendSmtpFileMessage 0 "89182:25" "pierre@iqsim.com" "dupon@gmail.com" "/var/tmp/test.msg" "pdubois" "iqsim" 60
FILE NOT FOUND