Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Application Server

Use Microsoft Exchange to send an e-mail message

  • Last UpdatedJul 22, 2024
  • 1 minute read

The following compatibility notes apply to use of this script:

  • The script will not work on Microsoft Office 2010 or later due to changes in MAPI handling.

  • The script is supported only for 32-bit versions of Microsoft Office.

  • If you are using Microsoft Office 2007, you must download and install Microsoft Collaboration Data Objects (CDO) 1.2.1. Additional information on CDO 1.2.1 is available at: http://www.microsoft.com/en-us/download/details.aspx?id=3671

    dim session as object;

    dim msg as object;

    dim sProfileInfo as string;

    sProfileInfo = "<type valid Microsoft Exchange Server Name here>" + StringChar(10) + "<type valid Exchange Server user name here>";

    session = CreateObject("MAPI.Session");

    session.Logon(, , False,False , , True, sProfileInfo);

    msg = session.Outbox.Messages.Add();

    msg.Recipients.Add("<type valid email address here>");

    msg.Recipients.Resolve();

    msg.Subject = "Reminder to self";

    msg.Text = "Pick up eggs and milk on your way home.";

    msg.Send();

    session.Logoff();

TitleResults for “How to create a CRG?”Also Available in