.NET emailing problem

M

Mark Rodseth

Okay, this is really annoying me so if you can help I'll
be very gratefull.

I am trying to send an email using the System.Web.Mail
Namespace - MailMessage and SMTPMail classes - and
something very strange is happening.

When I set the EmailFrom field, for example "Joe Bloggs
<[email protected]>", the angle brackets are converted
to square brackets. I need the angle brackets to stay
angle brackets because email readers only display
the 'Display Name' i.e. "Joe Bloggs". With square
brackets, "Joe Bloggs [[email protected]]" is displayed
as "Joe Bloggs [[email protected]]".

Anybody know how I can prevent the conversion from angle
brackets to square brackets?

Regards,

Mark Rodseth.
 
B

Bill

I don't think you can do this because it appears the underlying CDOSYS is
parsing the property and bulding the friendly name and email addrss of the
e-mail message.

If you can't get it working another option is the free SMTP.net component by
Quiksoft. http://www.quiksoft.com/freesmtp/

It will let you do this:

msgObj.From.Name="Joe Bloggs [[email protected]]";
msgObj.From.Email="(e-mail address removed)";

Bill.
 

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

Top