|
Home > Archive > IIS ASP > June 2004 > Strange bug with CDONTS
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Strange bug with CDONTS
|
|
| Eric Caron 2004-06-29, 5:55 pm |
| Hi all,
I have a page that lets the users make contact groups and send an email to
them. I have a form that lets the user enter the details of his message
including his full name and his email address. Once this form is submitted,
I do the following to get a string for .From property of the CDONTS mail
object:
Sender = userFullName & "<" & userEmailAddress & ">"
Now I stumbled upon a bug where if the user adds a title to his name (i.e.:
"John Smith, MD"), the address for the recipient gets truncated where the
comma is and the recipents can't reply as the address is now invalid. Is
there a way to encode any special character in the string so that it will be
mailer friendly?
Thanks in advance!
| |
| Aaron [SQL Server MVP] 2004-06-29, 5:55 pm |
| First off, have you tried using CDO.Message instead? CDONTS has been
deprecated, and at some point you will be forced to migrate from it anyway.
http://www.aspfaq.com/2026
You might experiment with stripping out problematic characters, surrounding
the name with some kind of delimiter, or just using the address in the From
property.
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Eric Caron" <ecaron@nospam.quebecaffaires.com> wrote in message
news:e$$$TDgXEHA.2940@TK2MSFTNGP09.phx.gbl...
> Hi all,
>
> I have a page that lets the users make contact groups and send an email to
> them. I have a form that lets the user enter the details of his message
> including his full name and his email address. Once this form is
submitted,
> I do the following to get a string for .From property of the CDONTS mail
> object:
>
> Sender = userFullName & "<" & userEmailAddress & ">"
>
> Now I stumbled upon a bug where if the user adds a title to his name
(i.e.:
> "John Smith, MD"), the address for the recipient gets truncated where the
> comma is and the recipents can't reply as the address is now invalid. Is
> there a way to encode any special character in the string so that it will
be
> mailer friendly?
>
> Thanks in advance!
>
>
|
|
|
|
|