Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Arul Prabakaran 6 posts 90 karma points c-trib
    Jun 07, 2022 @ 13:37
    Arul Prabakaran
    0

    Change sender name in EmailMessage

    Currently I'm using Umbraco 9 and trying to send mail using Umbraco Mail.

    EmailMessage acknowledgementMessage = new EmailMessage(_globalSettings.Smtp.From, emailTo.ToArray(), ccEmail.ToArray(), bccEmail.ToArray(), replyToEmail.ToArray(), "Thank you for contacting", userTemplate, true, attachments);
    await _emailSender.SendAsync(acknowledgementMessage, emailType: "Contact");
    

    I got the functions working, but the email doesn't have sender name.

    Is there a way I could change the name of the email sender.

    Thanks in advance.

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Jun 13, 2022 @ 16:06
    Huw Reddick
    1

    The sender is automatically set to the from address, you can't change that behavior using the IEmailSender and EmailMessage

Please Sign in or register to post replies

Write your reply to:

Draft