.NET emailing problem

Discussion in 'ASP .Net' started by Mark Rodseth, Apr 21, 2004.

  1. Mark Rodseth

    Mark Rodseth Guest

    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
    <>", 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 []" is displayed
    as "Joe Bloggs []".

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

    Regards,

    Mark Rodseth.
     
    Mark Rodseth, Apr 21, 2004
    #1
    1. Advertising

  2. Mark Rodseth

    Bill Guest

    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 []";
    msgObj.From.Email="";

    Bill.

    "Mark Rodseth" <> wrote in message
    news:206e01c42790$84d4f7e0$...
    > 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
    > <>", 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 []" is displayed
    > as "Joe Bloggs []".
    >
    > Anybody know how I can prevent the conversion from angle
    > brackets to square brackets?
    >
    > Regards,
    >
    > Mark Rodseth.
    >
     
    Bill, Apr 21, 2004
    #2
    1. Advertising

  3. Mark Rodseth

    Guest

    I was on completely the wrong track here. Turns out it was the Microsoft Exchange SMTP service which was stripping out headers and tampering in that Microsoft way we love so much.

    **********************************************************************
    Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
    Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
     
    , Apr 27, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephen

    emailing passwords using .NET

    Stephen, Jul 20, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    393
    R.Balaji
    Jul 23, 2004
  2. Farooq Khan

    emailing in ASP.NET

    Farooq Khan, Dec 29, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    862
    Farooq Khan
    Dec 30, 2003
  3. =?Utf-8?B?TWlrZSBNb29yZQ==?=

    Emailing From Asp.net

    =?Utf-8?B?TWlrZSBNb29yZQ==?=, Jul 29, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    423
    Jim Cheshire [MSFT]
    Sep 30, 2004
  4. John Smith

    ASP.NET Emailing

    John Smith, Nov 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,394
    John Smith
    Nov 5, 2004
  5. =?Utf-8?B?Q2hhcmxlc0E=?=

    utterly defeated by Emailing from .net

    =?Utf-8?B?Q2hhcmxlc0E=?=, Apr 11, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    340
    =?Utf-8?B?Q2hhcmxlc0E=?=
    Apr 11, 2007
Loading...

Share This Page