Tech Support > Microsoft Windows > Windows CRM > Email Messages sent by CRM 4.0 Router missing name from email addr
Email Messages sent by CRM 4.0 Router missing name from email addr
Posted by Wes Weeks on May 8th, 2008


We are using the CRM 4.0 email router for automatically sending emails using
the SDK, however when the message is received it only contains the email
address, not the full name of the user from CRM who sent the email.

For example, instead of an email with an address of
"Joe Blow"<jb@mailinator.com>

it only has
jb@mailinator.com

Is there any way of making the router include the name? This worked under 3.0

Thanks

Posted by AmyLa on May 15th, 2008


Wes,
Can you give me a bit more information? Which SDK message are you using to
send the e-mail? If appropriate, please post a code snippet.
Thanks,
Amy Langlois
Microsoft Dynamics CRM SDK



"Wes Weeks" wrote:

Posted by Wes Weeks on May 15th, 2008


It really isn't a coding issue. It doesn't include the name even sending
directly from CRM if you are using the CRM 4.0 email router for routing
outbound email. It will include if you use Outlook for sending/receiving
email.

Here is the code anyway. Its pretty basic send email code.

activityparty emailSender = new activityparty();
emailSender.partyid = new Lookup();
emailSender.partyid.Value = fromUserId;
emailSender.partyid.type = EntityName.systemuser.ToString();

activityparty recipient = new activityparty();
recipient.partyid = new Lookup();
recipient.partyid.type = EntityName.contact.ToString();
recipient.partyid.Value = sourceQuote.customerid.Value;

email quoteEmail = new email();
quoteEmail.from = new activityparty[] { emailSender };
quoteEmail.to = new activityparty[] { recipient };
quoteEmail.regardingobjectid = new Lookup();
quoteEmail.regardingobjectid.type = EntityName.opportunity.ToString();
quoteEmail.regardingobjectid.Value = opportunityId;
quoteEmail.subject = emailSubject;
quoteEmail.description = "description";

Guid emailId = service.Create(quoteEmail);

//generate tracking token for the email
GetTrackingTokenEmailRequest getTrackingTokenRequest = new
GetTrackingTokenEmailRequest();
getTrackingTokenRequest.Subject = "Outbound Email";
GetTrackingTokenEmailResponse trackingTokenResponse =
(GetTrackingTokenEmailResponse)service.Execute(get TrackingTokenRequest);

//send the email
SendEmailRequest sendEmail = new SendEmailRequest();
sendEmail.EmailId = emailId;
sendEmail.IssueSend = true;
sendEmail.TrackingToken = trackingTokenResponse.TrackingToken;

Response response = service.Execute(sendEmail);

"AmyLa" wrote:

Posted by AmyLa on May 16th, 2008


Wes,
We have confirmed that this is a problem in Microsoft Dynamics CRM. We are
investigating the problem and will post new information when it becomes
available.
Amy

"Wes Weeks" wrote: