I need to send an email in asp.net but I need sender appears like "MySiteName" without info@mysitename.com.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Carriage Return (ASCII chr 13) is missing from tex
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
Like this:
You will need to enter the
SmtpClient
's connection settings in Web.configThis is how it works.
you could try something like this
More info here
http://msdn.microsoft.com/en-us/library/system.net.mail.mailaddress.aspx
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 <info@mysitename>
For a downloadable example see here