Sending emails in asp.net with specific name instead of sender email

前端 未结 4 563
北恋
北恋 2021-02-02 10:38

I need to send an email in asp.net but I need sender appears like \"MySiteName\" without info@mysitename.com.

4条回答
  •  一个人的身影
    2021-02-02 11:12

    There are 2 ways, if you are using MailAddress you can use the constructor overload to input the display name, or simply format the recipient address as MySiteName

    For a downloadable example see here

提交回复
热议问题