Send a Custom E-mail for a Campaign Activity

banner art

The following sample demonstrates how to send an e-mail with a queue as the sender for a campaign activity.

public void SendEmail(Guid campaignActivityID)
   CrmService service = new CrmService();
   service.Credentials = 

   service.CallerIdValue = new CallerId();
   // Replace the GUID with the GUID of your Microsoft CRM
   // Administrator.
   service.CallerIdValue.CallerGuid =
      new Guid("FD80F8E8-C852-DA11-B1FB-0007E94D105B");

   SendEmailRequest req = new SendEmailRequest();
   req.EmailId = campaignActivityID;
   req.TrackingToken = "";
   req.IssueSend = true;

      SendEmailResponse res =
   catch (System.Web.Services.Protocols.SoapException er)
      //Process any error messages here.

© 2007 Microsoft Corporation. All rights reserved.