IIS and SMTP - CDO.Message email CC List problems

This is Interesting: Free IT Magazines  
Home > Archive > IIS and SMTP > July 2004 > CDO.Message email CC List problems





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 CDO.Message email CC List problems
Paul Cheevers

2004-07-09, 12:05 pm

Hi,

This is driving me nuts to say the least!!!!!

I am trying to send an email from some server side ASP
code and the CC field
is giving me some problems.

The code works fine if I have one or 2 email addresses in
the field (The
addresses are valid.) However if I have 4 it breaks. Now
the good
part......If I copy the 4 addresses (that were causing
the problem) into the
field a few times, so basically I have 16 addresses the
code works!!

I don't get an error back from the code when it breaks
and I don't see any
emails in the Bad Email, Pickup or Queue folders, the
email just doesn't
sent at all.

Also if I put the 4 addresses into the BCC field it works
fine. It only
breaks on the CC field.

The code is included below, any help would be greatly
appreciated.

Cheers,
P.

Dim cdoNewMail
Set cdoNewMail = safeServerCreateObject
( "CDO.Message" )


' Populate its properties

'cdoNewMail.MailFormat = 0 ' MIME format
cdoNewMail.From = """" & FromName & """" & "<" &
FromEmail & ">"
cdoNewMail.To = strToEmail

' Get the CC List
cdoNewMail.Cc = getCCList

cdoNewMail.Subject = Subject
cdoNewMail.HTMLBody = Body


'if the attachment file name is set then attach the
file to the mail
If(strFileName <> "") Then
cdoNewMail.AddAttachment strFilePath
End If

' Send the message

cdoNewMail.Send

' Cleanup

Set cdoNewMail = Nothing


Brian Staff

2004-07-09, 12:05 pm

Paul,

Show us the syntax of your 4 email addresses.

I think there was/is a bug in adding mutlitple names using the following
syntax:

John Doe<jodoe@aol.com>; Jane Doe<jadoe@aol.com>

Brian


Paul Cheevers

2004-07-09, 12:05 pm

Hi Brian.

The string for the email addresses is:
support@companyname.com;support2@company1.com;support3@company33.com;support
4@companyname.com

The weird thing is this string will work fine for the BCC field but not the
CC field.

Cheers,
P.

"Brian Staff" <brianstaff@[NoSpam]compuserve.com> wrote in message
news:VA.00000282.250e759b@bstaffw2k...
> Paul,
>
> Show us the syntax of your 4 email addresses.
>
> I think there was/is a bug in adding mutlitple names using the following
> syntax:
>
> John Doe<jodoe@aol.com>; Jane Doe<jadoe@aol.com>
>
> Brian
>
>



Brian Staff

2004-07-12, 5:56 pm

Paul,

Have tried playing with the string to alter the syntax slightly. I have used this, but I put spaces
after each semi-colon - for what thats worth. I'm sure it works for me...at least I think the
message was sent<g>.

Good luck - Brian

Paul Cheevers

2004-07-13, 5:57 pm

thanks for the reply....

I've managed to fix the problem....the mails were being stopped by our spam
filter on our exchange server!


"Brian Staff" <brianstaff@[NoSpam]compuserve.com> wrote in message
news:VA.00000283.388e56df@bstaffw2k...
> Paul,
>
> Have tried playing with the string to alter the syntax slightly. I have

used this, but I put spaces
> after each semi-colon - for what thats worth. I'm sure it works for

me...at least I think the
> message was sent<g>.
>
> Good luck - Brian
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com