RazorMailer with PDF attachment RRS feed

  • Question

  • User1240973086 posted

    Currently, We are using RazorMailer.Build function to send email. However the requirement has an PDF attachment to be embedded within the email. Please share, if there is an option to have the same. Thanks in advance.

    Sample code for reference:

    RazorMailer.Build("Template Name", razorData, data.ToMail, data.ToDisplayName)
                           .WithHeader("Header", DateTime.Now.ToLongTimeString())
                           .ToMailMessage().SendAsync((x, m) => { }, "");

    Note: razorData is the model data, to be replaced in the template(.cshtml )

    Tuesday, May 17, 2016 2:14 PM

All replies