Thursday, 12 September 2013

sending CRM email with just the email address only

Entity toParty = new Entity("activityparty");
toParty["addressused"] =" khan.kaleemul@gmail.com"

Entity email = new Entity("email");
email["from"]=new Entity[]{ <<from party>>};

email["to"]= new Entity[]{toParty};
email["subject"]="email subject";
email["description"]="email body";
email["regardingobjectid"]=<<"regarding entity">>;

Guid emailId = crmService.Create(email);

SendEmailRequest reqSendEmail = new SendEmailRequest();
reqSendEamil = emailId;
reSendEmail.TrackingToken = string.empty;
reqSendEmail.IssueSend = true;

crmService.Execute(reqSendEmail);

 

No comments:

Post a Comment