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

RE: Email Messages sent by CRM 4.0 Router missing name from email addr by AmyLa

AmyLa
Thu May 15 12:34:05 CDT 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:

> 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

RE: Email Messages sent by CRM 4.0 Router missing name from email by WesWeeks

WesWeeks
Thu May 15 15:04:02 CDT 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(getTrackingTokenRequest);

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

Response response = service.Execute(sendEmail);

"AmyLa" wrote:

> 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:
>
> > 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

RE: Email Messages sent by CRM 4.0 Router missing name from email by AmyLa

AmyLa
Fri May 16 12:14:07 CDT 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:

> 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(getTrackingTokenRequest);
>
> //send the email
> SendEmailRequest sendEmail = new SendEmailRequest();
> sendEmail.EmailId = emailId;
> sendEmail.IssueSend = true;
> sendEmail.TrackingToken = trackingTokenResponse.TrackingToken;
>
> Response response = service.Execute(sendEmail);
>
> "AmyLa" wrote:
>
> > 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:
> >
> > > 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