asp.net - How can I setup a friendly email name in the MailSetting section of web.config? -


currently have:

<system.net>     <mailsettings>     <smtp from="me@mydomain.com">         <network               host="localhost"               port="25"              />       </smtp>     </mailsettings>   </system.net> 

how can change email sent name , not email address only?

well, in code need put sender's name in quotes, followed e-mail address.

new smtpclient(...).send("\"john smith\" jsmith@somewhere.com", ...); 

and...it looks can encode attribute too...

<smtp from="&quot;john smith&quot; &lt;jsmith@somewhere.com&gt;"> 

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -