By Default, Many People Set The from Property of the MailMessage Class To Something Like:
Mail.from = "me@mycompny.com"
By doing this the email address will show up in the FROM line of most email readers, such as Outlook, Outlook Express, or Eudora. To have a friendly name be displayed (instead of the email address), use the following syntax.
Mail.from = "/" john smith / "
The Following Code Snippet Demonstrates this Technique.
[C #]
MailMessage Mail = New MailMessage ();
Mail.to = "me@mycompany.com";
Mail.From = "/" john smith / " Mail.subject = "this is a test email." Mail.body = "this is my test email body." SMTPMAIL.SMTPSERVER = "localhost"; // Your Real Server Goes Here SMTPMAIL.SEND (MAIL); [Vb.net] DIM Mail as new mailmessage () Mail.to = "me@mycompany.com" Mail.from = "" John Smith " Mail.subject = "this is a test email." Mail.Body = "this is my test email body." SMTPMAIL.SMTPSERVER = "localhost" 'Your Real Server Goes Here SMTPMAIL.SEND (MAIL)