473,372 Members | 1,078 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,372 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 14473
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.