hi all.
i have a mailer i'm trying to do, that sends out batches of 10 BCC addresses per email.
what i'm doing is reading the adrresses from a DB into an array of 10 fields. then, in my mailer function, i read that array into the BCC field.
is there maybe some kind of format for this? or is it not allowed? all i can get sent is the one regular TO field, the BCCs dont arrive.
below is the code.
thanks!
PS:, also just tried with semicolon seperators, but no go.
http://msdn.microsoft.com/library/d...html/6abfd58a-4ef0-41b8-92e8-d30365375a43.asp
i have a mailer i'm trying to do, that sends out batches of 10 BCC addresses per email.
what i'm doing is reading the adrresses from a DB into an array of 10 fields. then, in my mailer function, i read that array into the BCC field.
is there maybe some kind of format for this? or is it not allowed? all i can get sent is the one regular TO field, the BCCs dont arrive.
below is the code.
thanks!
Code:
Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message")
'This section provides the configuration information for the remote SMTP server.
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMailserver
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/usemessageresponsetext ") = True
' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password.
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="xxxxx"
ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="xxxxx"
ObjSendMail.Configuration.Fields.Update
'End remote SMTP server configuration section==
ObjSendMail.To = strSendTo & "<" & strSendToEmail & ">" '"someone@someone.net"
'read from array here:
for h = 0 to 9
if BCCemailARR(h) <> "" then
' this tests that the array does actually have contents:
response.Write(h & ":" & BCCemailARR(h))
if h = 0 then
ObjSendMail.Bcc = h & " <" &BCCemailARR(h) & "> " '"someone@someone.net"
else
ObjSendMail.Bcc = ObjSendMail.BCC & ", " & h & " <" & BCCemailARR(h) & "> " '"someone@someone.net"
end if
end if
next
ObjSendMail.Subject = strSubject
ObjSendMail.From = "HHHHH <postmaster@HHHH>"
ObjSendMail.ReplyTo = strReplyTo
strEmailBody = "<html dir=""RTL""><head><title>Message</title></head><body>" & strEmailBody &"</body></html>"
ObjSendMail.HTMLBody = doHTML(Server.HTMLEncode(strEmailBody))
ObjSendMail.Send
Set ObjSendMail = Nothing
PS:, also just tried with semicolon seperators, but no go.
http://msdn.microsoft.com/library/d...html/6abfd58a-4ef0-41b8-92e8-d30365375a43.asp