SMTP Protocol Overview

SMTP Vuser script functions emulate the Single Mail Transfer Protocol traffic. Each SMTP function begins with an smtp prefix. For detailed syntax information on these functions, see the Function Reference.

In the following example, the smtp_send_mail function sends a mail message, through the SMTP mail server, techno.

Actions()
{
    smtp_logon("Logon",
               "URL=smtp://user0001t@techno.merc-int.com",
               "CommonName=Smtp Test User 0001",
               NULL);
    smtp_send_mail(    "SendMail",
                    "To=user0002t@merc-int.com",
                    "Subject=MIC Smtp: Sample Test",
                    "MAILOPTIONS",
                    "X-Priority: 3",
                    "X-MSMail-Priority: Medium",
                    "X-Mailer: Microsoft Outlook Express 5.50.400\r\n",
                    "X-MimeOLE: By Microsoft MimeOLE V5.50.00\r\n",
                    "MAILDATA",
                    "MessageText="
                        "Content-Type: text/plain;\r\n"
                        "\tcharset=\"iso-8859-1\"\r\n"
                        "Test,\r\n"
                        "MessageBlob=16384",
                NULL);
    smtp_logout();
    return 1;
}

Note: When recording a login step in which an IP address was specified, the script saves the IP address instead of the host name.