Export (0) Print
Expand All

Send a Custom E-mail for a Campaign Activity

CRM 1.2
banner art

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

[C#]
public void SendEmail(Guid campaignActivityID)
{
   CrmService service = new CrmService();
   service.Credentials = 
      System.Net.CredentialCache.DefaultCredentials;

   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;

   try 
   {
      SendEmailResponse res =
         (SendEmailResponse)service.Execute(req);
   }
   catch (System.Web.Services.Protocols.SoapException er)
   {
      //Process any error messages here.
   }
}

© 2007 Microsoft Corporation. All rights reserved.


Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft