Email Sender info!

  • Thread starter Thread starter Ammar
  • Start date Start date
A

Ammar

Hi all....
Sending e-mails by ASP.NET is quite easy and flexible....
But i have a small problem:
How do i send the sender's name with the e-mail? when i send ASP.NET mail
using the SmtpMail.Send() i get the sender's e mail address in the name
feild of the inbox of the recepient.
I even looked att the System.Web.Mail.MailMessage class but couldnt find the
answer.
any suggestions?
Ammar
 
I've not used this but have you tried specifying the senders email address
as "SenderName<[email protected]>" ? in some controls that works,
maybe here?

Hope this helps!
wardeaux
 
You can do this by formatting the To property correctly.
Ammar, I'm guessing your current To property looks something like the
following:

MailMessage m = new MailMessage();
m.To = "(e-mail address removed)";

Instead, try:

m.To = "My Name <[email protected]>";

You can read RFC 822 to get all the nitty gritty details and options.
http://www.faqs.org/rfcs/rfc822.html
 
Back
Top