problem sending CDO email
I'm using the default script for sending emails from my website via CDO.
The script generally works, but recently I've been unable to send an email to a list of 500 clients.
I'm sending it to the recipients under .BCC (so they don't see each other) and the list is semicolon-space (; ) delimited.
As I said, the script works when I choose a single recipient, and in the past it worked for multiple recipients.
Is there a limit to the length of the recipient list?
The mail is going out with an 86kb attachment. Is there a size limit?
My script is below:
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Message from X"
myMail.From="[email protected]"
myMail.To= "[email protected]"
myMail.Bcc = MailingList
myMail.TextBody = request("Msgbody")
If request("attachment") <> "" then
sFilepath = "/Attachments"
sServerPath = Server.MapPath(sFilePath)
if not right(sServerPath,1) = "\" THEN sServerPath = sServerPath & "\"
sServerPath = sServerPath & request("attachment")
myMail.AddAttachment sServerPath
end if
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
myMail.Configuration.Fields.Update
The xxxx are in place of my actual addresses, and the variable MailingList is the list of emails ([email protected]; [email protected]; [email protected])
Thanks all.
Re: problem sending CDO email
i am not much of a programmer, but have you removed all of the variables you mentioned? by this, i mean did you try it with 50 recipients, then without the attachment, etc.? not much help, but sometimes when i'm too close to a problem for too long, i forget the small details and need a push in the right direction.
i wouldn't have answered this, but noticed you haven't received any other answers yet, so hope this helps.