|
Hello
I have written this code to loop through some email addess`s from a database and then it sends them a message. I dont get any errors and it all seams to work, execpt no actual message are sent. Since I dont receive any of my tests.
Can any one please help, Iam not sure if its the code or if its some thing like the SMTP.server ??/ Iam fairly new to this type of thing.
Thank you for your time.
Creepy
----------------------------------------------------------
Response.Write ("Newsletters are being created")
Response.Write ("<p>")
Dim strRecipient
Dim strFrom
Dim strSubject
Dim strBody
Dim Jmail
`loop through entries
While not rsEmailAddress.EOF
`get the results from the newsletter form
strFrom = Session("svFrom")
strSubject = Session("svSubject")
strBody = Session("svMessage")
strRecipient = rsEmailAddress.Fields.Item("EmailAddress").Value
`create an instance of the Jmail object
Set Jmail = Server.CreateObject("JMail.SMTPMail")
`set Jmail various properties
JMail.ServerAddress = "smtp.domainname.com"
JMail.ContentType = "text/html"
JMail.AddRecipientBCC strRecipient
JMail.Sender = strFrom
JMail.Subject = strSubject
JMail.Body = strBody
JMail.addHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
Jmail.Execute
`print message for every entry
Response.Write ("message sent to " & strRecipient & "<br>")
`move to next entry in database
rsEmailAddress.MoveNext
Wend
`message to admin saying creation has completed
Response.Write ("<p>")
Response.Write ("newsletter creation completed ")
|
|
|
|
|
|
|
// |