Test a MS Exchange server sending and receiving emails.
This can be achieved in 2 ways:
Using MAPI - SilkPerformer 7.0 introduced support for the MAPI interface. You can drive MAPI email clients such as MS Outlook for the sending, receiving, and deleting of email via the Microsoft Exchange infrastructure.
MAPI is an Abbreviation of Messaging Application Programming Interface, a system built into Microsoft Windows, which enables different e-mail applications to work together to distribute mail. As long as both applications are MAPI-enabled, they can share mail messages with each other.
Please see the 'MAPI Functions Reference' section of Silk Performer help for more details.
An alternative is if you have configured the mail client to use a POP3 Server instead of the Exchange server. When you have done this you will then need to do the following:
- Go to settings | System settings | Recorder | Application profiles
- Select Add
- Now set an Application profile for your application (e.g. Outlook)
- You will need to hook the Outlook.exe file from the path that it resides on, by default: C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE
- Set the application type to custom and select Winsock API
You should now be able to record the sending and receiving of emails.
A recorded POP3 script will look similar to the BDF example below:
benchmark SilkPerformerRecorder use "WebAPI.bdh" dcluser user VUser transactions TInit : begin; TMain : 1; var dclrand dcltrans transaction TInit begin end TInit; transaction TMain var hPop0 : number; hSmtp0 : number; nMsgNumber : number; nMsgSize : number; begin WebPopConnect(hPop0, "126.96.36.199", 110); // IP address of mail server WebPopUser(hPop0, "mailbox username"); WebPopPass(hPop0, "mailbox password"); WebPopStat(hPop0, nMsgNumber, nMsgSize); WebPopQuit(hPop0); WebPopShutdown(hPop0); WebSmtpConnect(hSmtp0, "188.8.131.52", 25); WebSmtpHello(hSmtp0, "mailbox username"); WebSmtpMail(hSmtp0, " "); // Users email address WebSmtpRecipient(hSmtp0, " "); WebSmtpData(hSmtp0, "From: \"User1\" \r\n" "To: \"user2\" \r\n" "Subject: test message\r\n" "Date: Tue, 14 Jan 2003 18:55:34 -0000\r\n" "Message-ID: \r\n" "MIME-Version: 1.0\r\n" "Content-Type: text/plain;\r\n" "\tcharset=\"iso-8859-1\"\r\n" "Content-Transfer-Encoding: 7bit\r\n" "X-Priority: 3 (Normal)\r\n" "X-MSMail-Priority: Normal\r\n" "X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)\r\n" "Importance: Normal\r\n" "X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200\r\n" "\r\n", 512); ThinkTime(2.2); WebSmtpQuit(hSmtp0); WebSmtpShutdown(hSmtp0); ThinkTime(2.5); end Tmain;