B
blair
Hi:
I'm trying to send a message using JMail with the following ASP code
(using ADO to connect to MS Access database). :
____________________________________________
Set objRS1 = strConnect1.Execute(strSQL1)
Dim msg, varRecipient
Set msg = Server.CreateObject("JMail.Message")
msg.logging = true
msg.From = varEmail
msg.FromName = varName
While Not objRS1.EOF
msg.addRecipient objRS1.Fields("StudentEmail")
objRS1.MoveNext
Wend
msg.Subject = varSubject
msg.Body = varMessage
msg.Send ("mail.myemailserver.com")
Set msg = nothing
_________________________________
The code gives an error saying the server did not receive the message,
or sometimes it goes through but the email is not sent. I did a
response.write in the loop just to test it was getting the email
addresses all right from the database and it was. Any idea what is
wrong? BTW, I am not spamming, this is a newsletter for people who
signed up for said newsletter.
I'm trying to send a message using JMail with the following ASP code
(using ADO to connect to MS Access database). :
____________________________________________
Set objRS1 = strConnect1.Execute(strSQL1)
Dim msg, varRecipient
Set msg = Server.CreateObject("JMail.Message")
msg.logging = true
msg.From = varEmail
msg.FromName = varName
While Not objRS1.EOF
msg.addRecipient objRS1.Fields("StudentEmail")
objRS1.MoveNext
Wend
msg.Subject = varSubject
msg.Body = varMessage
msg.Send ("mail.myemailserver.com")
Set msg = nothing
_________________________________
The code gives an error saying the server did not receive the message,
or sometimes it goes through but the email is not sent. I did a
response.write in the loop just to test it was getting the email
addresses all right from the database and it was. Any idea what is
wrong? BTW, I am not spamming, this is a newsletter for people who
signed up for said newsletter.