473,394 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

CDO.Message email CC List problems

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
Jul 19 '05 #1
5 14478
what's the value of the field when it breaks?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Paul Cheevers" <pa**@nospamaimware.com> wrote in message
news:O0**************@TK2MSFTNGP10.phx.gbl...
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

Jul 19 '05 #2
The value returned from the getCCList function is e.g.
su*****@companyname.com;su******@com...@company33.com;support
4@companyname.com

but if we took ANY email address off it would work.

Cheers,
P.

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:Om*************@TK2MSFTNGP12.phx.gbl...
what's the value of the field when it breaks?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Paul Cheevers" <pa**@nospamaimware.com> wrote in message
news:O0**************@TK2MSFTNGP10.phx.gbl...
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


Jul 19 '05 #3
> safeServerCreateObject("CDO.Message")

What is this function?
cdoNewMail.From = """" & FromName & """" & "<" & FromEmail & ">"
Have you tried just using an e-mail address here, instead of the expanded
format?
cdoNewMail.Cc = getCCList
Can you show the code for this function or whatever builds this string?
cdoNewMail.Send


Do you have on error resume next going in this page? If so, try this:

on error resume next
cdoNewMail.Send
if err.number <> 0 then response.write err.description

--
http://www.aspfaq.com/
(Reverse address to reply.)
Jul 19 '05 #4
Function safeServerCreateObject( strClassId )
Dim objInstance

On Error Resume Next
Set objInstance = Server.CreateObject( strClassId )

If ( Err.Number <> 0 ) Then

handleError "ServerCreateObject", Err.Number,
strClassId, Err.Description, "", ""

End If
On Error GoTo 0

Set safeServerCreateObject = objInstance

End Function

I tried using the email address for the 'cdoNewMail.From' and no luck.
The function getCCList is as follows

Public Function getCCList()

Dim arrCCList
arrCCList = ToCCEmail

Dim strCCList
strCCList = ""

Dim i

If ( VarType( arrCCList ) >= vbArray ) Then
For i = LBound( arrCCList ) To UBound( arrCCList )
strCCList = strCCList & arrCCList(i) & ";"
Next
Else
strCCList = ToCCEmail
End If

' Finished

getCCList = strCCList

End Function

Note when trying to debug this problem I've changed this line to be:
cdoNewMail.Cc =
"su*****@companyname.com;su******@company1.com;su* *****@company33.com;suppor
t
4@companyname.com"

I also added the on error resume next but it does not catch the 'Error'. In
fact I don't think the send method is retuning an error its just not sending
the emails!

Cheers,
P.

"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
safeServerCreateObject("CDO.Message")


What is this function?
cdoNewMail.From = """" & FromName & """" & "<" & FromEmail & ">"


Have you tried just using an e-mail address here, instead of the expanded
format?
cdoNewMail.Cc = getCCList


Can you show the code for this function or whatever builds this string?
cdoNewMail.Send


Do you have on error resume next going in this page? If so, try this:

on error resume next
cdoNewMail.Send
if err.number <> 0 then response.write err.description

--
http://www.aspfaq.com/
(Reverse address to reply.)

Jul 19 '05 #5
fixed it!!!

it was caused by our spam filtering on our exchange server!!!

"Paul Cheevers" <pa**@nospamaimware.com> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Function safeServerCreateObject( strClassId )
Dim objInstance

On Error Resume Next
Set objInstance = Server.CreateObject( strClassId )

If ( Err.Number <> 0 ) Then

handleError "ServerCreateObject", Err.Number,
strClassId, Err.Description, "", ""

End If
On Error GoTo 0

Set safeServerCreateObject = objInstance

End Function

I tried using the email address for the 'cdoNewMail.From' and no luck.
The function getCCList is as follows

Public Function getCCList()

Dim arrCCList
arrCCList = ToCCEmail

Dim strCCList
strCCList = ""

Dim i

If ( VarType( arrCCList ) >= vbArray ) Then
For i = LBound( arrCCList ) To UBound( arrCCList )
strCCList = strCCList & arrCCList(i) & ";"
Next
Else
strCCList = ToCCEmail
End If

' Finished

getCCList = strCCList

End Function

Note when trying to debug this problem I've changed this line to be:
cdoNewMail.Cc =
"su*****@companyname.com;su******@company1.com;su* *****@company33.com;suppor t
4@companyname.com"

I also added the on error resume next but it does not catch the 'Error'. In fact I don't think the send method is retuning an error its just not sending the emails!

Cheers,
P.

"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
safeServerCreateObject("CDO.Message")


What is this function?
cdoNewMail.From = """" & FromName & """" & "<" & FromEmail &
">"
Have you tried just using an e-mail address here, instead of the expanded format?
cdoNewMail.Cc = getCCList


Can you show the code for this function or whatever builds this string?
cdoNewMail.Send


Do you have on error resume next going in this page? If so, try this:

on error resume next
cdoNewMail.Send
if err.number <> 0 then response.write err.description

--
http://www.aspfaq.com/
(Reverse address to reply.)


Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Spammay Blockay | last post by:
Does anybody know of a solid Java-based email list management product? - Tim --
20
by: Lucas Raab | last post by:
I'm done porting the C code, but now when running the script I continually run into problems with lists. I tried appending and extending the lists, but with no avail. Any help is much appreciated...
6
by: Rylios | last post by:
I am trying to make a very basic text editor using a linked list, fstream, sorting... This is what i have so far...
2
by: Tomdhu | last post by:
I've got a Contacts & Events database in Access 2K where contacts attend various events. At present, where I want to group e-mail all the attendees who are going to attend a particular event, I...
0
by: Franz Steinhaeusler | last post by:
Sorry about asking here, but has anyone experienced, that no message can be sent to the mailing list? Neither with Gmane, nor with Google mail. I always get this reply: from...
2
by: sidaf | last post by:
Hello, I'm writing a connection management class, but I'm running into problems with the std::list template. I want to use a list to help manage my Connection objects. The ConnectionManager...
2
by: giotheninman | last post by:
I have a stl list and i have a problem allocating memory for it. I am using the malloc operator in order to get memory for it and I have tried using placement new but it still isnt setting up the...
3
by: SAL | last post by:
Hello, is there a way to get this webcontrol to behave more like its winform cousin? In a winform dropdown, you can set the SelectedIndex to -1 and no items will be showing in the drop list. This...
5
by: =?Utf-8?B?U3RldmUgQXVkdXMsIENoYXVjZXIgQkVDLCBTaGVm | last post by:
How do I alter the follow asp code so the from field produces the a friendly address "Name <something@changeme.com>" Code is presently used. <% If Request.Form("btnSend").Count 0 Then Set...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.