Skip to main content
Dynamics 365 general forum

eMail Templates Attachments - Using SendEmailFromTemplateRequest Class

editSubscribe (0) ShareShare
Posted on by 55

Hi All,

I was added PDF attachment file to existing email template and call the template from the code using SendEmailFromTemplateRequest class as the following code

                   SendEmailFromTemplateRequest sendEmailreq = new SendEmailFromTemplateRequest


                       Target = email,

                       TemplateId = emailTemplate.Id,

                       RegardingId = regardingId,

                       RegardingType = entRegardingType,



but the attachement file not sent and checking the activity email from CRM side shows that the email was sent without attached file and the attached part is empty

So should i do something else or is there any missing steps.


  • moelshimy Profile Picture
    moelshimy 55 on at
    RE: eMail Templates Attachments - Using SendEmailFromTemplateRequest Class

    Hi there,

    Yes i tried it directly from CRM and working fine but not working in the code.

  • Community Member Profile Picture
    Community Member UG Leader on at
    RE: eMail Templates Attachments - Using SendEmailFromTemplateRequest Class

    Hi partner,

    Have you tried to use the template with PDF attachment to send email directly from crm.

    The result is same with using SendEmailFromTemplateRequest in code?


    Leah Ju

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,068 Super User

Martin Dráb Profile Picture

Martin Dráb 222,591 Super User

nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans