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 don't think you can....you will most likely need a 3rd party package.
 
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
 
Hi
Thank yo so much for the wonderful information...
thank yo all
Ammar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top