Answered by:
to send mail when a contact is added to marketing list

Question
-
Hi,
I am new in CRM I want to send email to those Contacts which are added in Marketing List. Is it possible to send mail when a record is added to marketing list.....?
Can anyone push me into the right directionThanx.
Yasir
Wednesday, August 27, 2014 6:34 PM
Answers
-
You need to write a plugin to retrieve records on update of a marketing list and send a email to each and every member in the list.
Out of the box process flow is you can create a campaign activity and send a email blast to all members in the list.
- Proposed as answer by Rui Lloyd Alvares Thursday, August 28, 2014 9:00 AM
- Edited by Rui Lloyd Alvares Thursday, August 28, 2014 9:06 AM
- Unproposed as answer by Rui Lloyd Alvares Thursday, August 28, 2014 12:35 PM
- Marked as answer by Mr.Yasir ali Wednesday, September 3, 2014 12:20 PM
Thursday, August 28, 2014 7:45 AM -
You need to trigger your plugin on "Addmember" message of Marketing List entity on "post execution event".
if (context.InputParameters.Contains("EntityId") &&
context.InputParameters["EntityId"] is Guid)
{
Guid entityId = (Guid)context.InputParameters["EntityId"];
var query = from c in servicecontext.ContactSet
where c.Id == entityId
select c;
here you will get the details of the contact record you added
after retrieving the mail id try this link to send an email http://msdn.microsoft.com/en-in/library/hh210217.aspx
}- Edited by Rui Lloyd Alvares Thursday, August 28, 2014 12:36 PM
- Proposed as answer by Rui Lloyd Alvares Thursday, August 28, 2014 12:42 PM
- Marked as answer by Mr.Yasir ali Wednesday, September 3, 2014 12:20 PM
Thursday, August 28, 2014 12:35 PM -
Did you get the code of how to send an email ?
write a linq query to retrieve the marketing list having name "ABC" and ur done.
And dude plz mark as answer if you feel its the right answer
- Edited by Rui Lloyd Alvares Saturday, August 30, 2014 12:58 PM
- Marked as answer by Mr.Yasir ali Wednesday, September 3, 2014 12:20 PM
Saturday, August 30, 2014 11:52 AM
All replies
-
You need to write a plugin to retrieve records on update of a marketing list and send a email to each and every member in the list.
Out of the box process flow is you can create a campaign activity and send a email blast to all members in the list.
- Proposed as answer by Rui Lloyd Alvares Thursday, August 28, 2014 9:00 AM
- Edited by Rui Lloyd Alvares Thursday, August 28, 2014 9:06 AM
- Unproposed as answer by Rui Lloyd Alvares Thursday, August 28, 2014 12:35 PM
- Marked as answer by Mr.Yasir ali Wednesday, September 3, 2014 12:20 PM
Thursday, August 28, 2014 7:45 AM -
Hi ruialvares,
Can you send me any link or sample code related to tihs.
thanx.
- Edited by Mr.Yasir ali Thursday, August 28, 2014 9:19 AM
Thursday, August 28, 2014 8:56 AM -
You need to trigger your plugin on "Addmember" message of Marketing List entity on "post execution event".
if (context.InputParameters.Contains("EntityId") &&
context.InputParameters["EntityId"] is Guid)
{
Guid entityId = (Guid)context.InputParameters["EntityId"];
var query = from c in servicecontext.ContactSet
where c.Id == entityId
select c;
here you will get the details of the contact record you added
after retrieving the mail id try this link to send an email http://msdn.microsoft.com/en-in/library/hh210217.aspx
}- Edited by Rui Lloyd Alvares Thursday, August 28, 2014 12:36 PM
- Proposed as answer by Rui Lloyd Alvares Thursday, August 28, 2014 12:42 PM
- Marked as answer by Mr.Yasir ali Wednesday, September 3, 2014 12:20 PM
Thursday, August 28, 2014 12:35 PM -
Thank You very much Rui Lloyd Alvares,
Its working now but i want to send mail to specific Marketing List members.
Client Requirment is:
This email will not be every time any user get added into the Markiting lists but only when it get added to a specific markiting list "ABC" then we want to send him an confirmation email.
thanx .
Friday, August 29, 2014 11:07 AM -
Did you get the code of how to send an email ?
write a linq query to retrieve the marketing list having name "ABC" and ur done.
And dude plz mark as answer if you feel its the right answer
- Edited by Rui Lloyd Alvares Saturday, August 30, 2014 12:58 PM
- Marked as answer by Mr.Yasir ali Wednesday, September 3, 2014 12:20 PM
Saturday, August 30, 2014 11:52 AM