SendSmtpTextMessage

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 specified text in PLAIN-TEXT format. If any of required parameters is not needed it can be specified as NULL string (""). All email parameters can contain multiple addresses, separated with ',' character.
Optional User Name and Password can be specified if authentication is required. Optional SSL flag can be added at the end of this command. Optional Timeout can be specified.
Command waits until Email message is sent or general timeout expired.


COMMAND

Command Input arguments Returns
SendSmtpTextMessage Port index, SMTP Server IP Address or Host Name, [:Peer Port], Sender Name, Sender Email Address, Recipient Email Address, CC Email Address, BCC Email Address, Subject, Message Text, [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

~# SendSmtpTextMessage 0 smtp.iqsim.com "pierre@iqsim.com" "Pierre Dubois" "dupon@gmail.com" "" "" "Test" "Test message"
EMAIL MESSAGE SENT

~# SendSmtpTextMessage 0 89182:25 "pierre@iqsim.com" "Pierre Dubois" "dupon@gmail.com, delacroix@yahoo.fr" "simon@laposte.fr" "chief@iqsim.com" "Test" "Test message" "pdubois" "iqsim"
DESTINATION HOST NOT REACHABLE

~# SendSmtpTextMessage 0 89182 "pierre@iqsim.com" "Pierre Dubois" "dupon@gmail.com" "" "" "Test" "Test message"
DATA LINK IS DOWN

~# SendSmtpTextMessage 0 smtp.iqsim.com "pierre@iqsim.com" "Pierre Dubois" "dupon@gmail.com" "" "" "Test" "Test message"
AUTHENTICATION

~# SendSmtpTextMessage 0 smtp.iqsim.com "pierre@iqsim.com" "Pierre Dubois" "dupon@gmail.com" "" "" "Test" "Test message"
SMTP RECIPIENT REJECTED BY SERVER

~# SendSmtpTextMessage 0 smtp.iqsim.com "pierre@iqsim.com" "Pierre Dubois" "dupon@gmail.com" "" "" "Test" "Test message" "pdubois" "iqsom"
PASSWORD REJECTED BY SERVER

~# SendSmtpTextMessage 0 smtp.iqsim.com "pierre@iqsim.com" "Pierre Dubois" "dupon@gmail.com" "" "" "Test" "Test message" "dubois" "iqsim"
USER NAME REJECTED BY SERVER

~# SendSmtpTextMessage 0 smtp.iqsim.com "pierre@iqsim.com" "Pierre Dubois" "dupon@gmail.com" "" "" "Test" "Test message" 60
TIMEOUT EXPIRED