How to send email by simple email address using crm?

3.4k Views Asked by At

I'm working with Dynamics CRM 2016, I want to send an Email from crm using an email address that the user insert (the email Id is taken from a field in incident-Entity and not from crm-user) according to examples online the option is to use entityreference from another entity that will hold and get the Email address, is there a way not to use Entityreference but instead get my email address from a simple field on incident form?

3

There are 3 best solutions below

2
Arun Vinoth-Precog Tech - MVP On BEST ANSWER

Update:

but instead get my email address from a simple field on incident form?

This is not possible in CRM UI. But possible using the code snippet from the blog link in comment. You have to query the textbox content and put in recipient party address.


(These two lines are for sending email to activity party email Id from associated record non-email field from CRM UI, without any code or customization for this particular scenario)

Unfortunately you cannot achieve it.

Only way is associated record.

0
Yaqub Ahmad On

You can do it programmatically! You can send an email to a person who is not a Lead/Contact/Account.. The CRM will send email but it will show un resolved referenced when you open it in CRM

0
Henk van Boeijen On

You can use e-mail addresses that are not associated with e-mailaddress fields. It just requires a few steps.

In the UI navigate to Settings > System Settings > tab Email > header "Set Email form options".

Make sure setting "Allow messages with unresolved email recipients to be sent" is Yes.

Now you can use literal e-mail addresses like in this example:

var sender = new EntityCollection();
sender.Entities.Add(new Entity("activityparty")
{
    ["addressused"] = "[email protected]"
});

var recipients = new EntityCollection();
recipients.Entities.Add(new Entity("activityparty")
{
    ["addressused"] = "[email protected]"
});

var eMail = new Entity("email")
{
    ["from"] = sender,
    ["to"] = recipients,
    ["subject"] = "Just a test",
    ["description"] = "Body of your e-mail"
};

organizationService.Create(eMail);