Skip to main content

Posts

Showing posts with the label SendEmailResponse

CRM to SendEmail

Send email functionality with CRM internal static Boolean SendEmail(string toAddress, Guid? fromPartyGuid, string subjectLine, string body, Guid? contactId,string templateName) { CrmService crmService = GetCrmService(); //[[FROM activity party for the email. activityparty fromParty = new activityparty(); fromParty.partyid = new Lookup(); fromParty.partyid.type = EntityName.queue.ToString(); fromParty.partyid.Value = fromPartyGuid; //]] //[[TO activity party for email activityparty toParty = new activityparty(); toParty.partyid = new Lookup(); toParty.partyid.type = EntityName.contact.ToString(); toParty.partyid.Value = (contactId.HasValue) ? contactId.Value : new Guid(""); //]] //[[Create a new email and set its properties email emailInstance = new email(); //set email parameters emailInstance.from = new ac...