Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Test a MS Exchange server sending and receiving emails.

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:


  1. Go to settings | System settings | Recorder | Application profiles
  2. Select Add
  3. Now set an Application profile for your application (e.g. Outlook)
  4. 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
  5. 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"

    TInit           : begin;
    TMain           : 1;



  transaction TInit
  end TInit;

  transaction TMain
    hPop0      : number;
    hSmtp0     : number;
    nMsgNumber : number;
    nMsgSize   : number;
    WebPopConnect(hPop0, "", 110); // IP address of mail server
    WebPopUser(hPop0, "mailbox username");
    WebPopPass(hPop0, "mailbox password");
    WebPopStat(hPop0, nMsgNumber, nMsgSize);
    WebSmtpConnect(hSmtp0, "", 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"
      "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);
end Tmain;


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 18:58
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.