1. SPEForums need your contributions to build up a strong repository of performance engineering resources.

    Dismiss Notice
Dismiss Notice
Hello Guest,

Please reach out to us at anmldubey@gmail.com in case you face any issues with SPEForums. Share your feedback - Click Here

Please support us by sharing performance engineering tutorials/resources with SPEForums.com


POP Protocol to retrieve email from mailbox

Learn using POP protocol in loadrunner

  1. admin
    To retrieve an email from gmail using loadrunner

    Prerequisite : A working gmail account with password.

    We created a script using POP3 Protocol in loadrunner and used following code to retrieve the emails

    //int totalMessages;
        pop3_logon("Login", "URL=pop3s://{PUserID}:{PPassword}@pop.gmail.com:995","STARTTLS",LAST);
        //pop3_logon("Login", "URL=pop3://user0004t:my_pwd@techno.merc-int.com", LAST );
        // List all messages on the server and receive that value
        //totalMessages = pop3_list("POP3", LAST);
        // Display the received value (It is also displayed by the pop3_list function)
    //    lr_log_message("There are %d messages.\r\n\r\n", totalMessages);
        // Retrieve 5 messages on the server without deleting them
        pop3_retrieve("POP3", "RetrieveList=1:2:3:4", "DeleteMail=false", "SaveTo=test",LAST);
    Using the above code we were successfully able to retrieve email number 1, 2, 3, 4 from our gmail id.

    Note - My Gmail ID got blocked after 2 days - So be careful while testing with your gmail account.