Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Custom Workflow activity/Plugin to send Email to a recipient not in CRM

$
0
0

I have a requirement to send email to recipients not in crm.

That is not a look up to the party activity entity ..how can this be achieved the  current code only allows a look up

		Guid fromID = context.UserId;
		Entity sendEmail = new Entity("email");

		Entity fromReciepent = new Entity("activityparty");
		fromReciepent["partyid"] = new EntityReference("systemuser", fromID); //gets the look up

		sendEmail["subject"] = emailSubject;
		sendEmail["from"] = new Entity[] { fromReciepent }; // this works
		sendEmail["description"] = fullhtml;
		sendEmail["bcc"] = "test@yahoo.com ";  // This does not work,
		sendEmail["to"] = new Entity[] { fromReciepent }; //this works

Guid emailID = service.Create(sendEmail); SendEmailRequest reqSendEmail = new SendEmailRequest(); reqSendEmail.EmailId = emailID; reqSendEmail.IssueSend = true; reqSendEmail.TrackingToken = ""; service.Execute(reqSendEmail);


The code works but am more concerned about this line that does not work because it is the most important

sendEmail["bcc"] = "test@yahoo.com ";  

I have changed the settings on CRM to allow unresolved recipients

and have tested it from the front end, so why does it not work with the code.

  


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images