ReceivePopMessage

From IRON Test Suite
Jump to navigation Jump to search

DESCRIPTION

This command gets a specified Email message from POP3 server on the specified GSM port. It requires that Data session on the specified GSM port be already up. Message with the specified index will be get from POP3 mailbox. Message delete flag can TRUE or FALSE. Optional file path where received Email message is saved can be specified, otherwise default file (/var/tmp/test.pop) is used. Optional SSL flag can be added at the end of this command. Command waits until Email message is retrieved or general timeout expired.


COMMAND

Command Input arguments Returns
ReceivePopMessage Port index, POP Server IP address or Host Name, Peer Port, User Name, Password, Message Index, Delete Flag, [Message File Path, SSL flag] Message saved in specified file, in the case of error, Error Code

All error messages are available in Data Commands Status Message list


EXAMPLE

~# GetNumberOfPopMessages 0 "pop.iqsim.com" "dupon" "parismonamour"
OK MESSAGES: 10 SIZE: 1240000

~# ReceivePopMessage 0 "pop.iqsim.com" "dupon" "parismonamour" 2 TRUE
OK

~# GetNumberOfPopMessages 0 "pop.iqsim.com" "dupond" "parismonamour"
OK MESSAGES: 9 SIZE: 1120000

~# ReceivePopMessage 1 "89182:110" "dupond" "parismonamour" 3 FALSE "/var/test/popeml"
OK

~# ReceivePopMessage 4 "pop.iqsim.com" "dupond" "parismonamour" 2 TRUE
DATA LINK IS DOWN

~# ReceivePopMessage 4 "pop.iqsim.com" "dupond" "parismonamour" 2 TRUE
DESTINATION HOST NOT REACHABLE

~# ReceivePopMessage 4 "pop.iqsim.com" "pondud" "parismonamour" 2 TRUE
USER NAME REJECTED BY SERVER

~# ReceivePopMessage 4 "pop.iqsim.com" "dupond" "paris " 2 TRUE
PASSWORD REJECTED BY SERVER

~# ReceivePopMessage 4 "pop.iqsim.com" "dupond" "paris " 22 TRUE
BAD INDEX

~# ReceivePopMessage 4 "pop.iqsim.com" "dupond" "paris " 2 TRUE
TIMEOUT EXPIRED