codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  ASP / Jail Lopp Please help  Archive Import (Creeping Death) at 22:57 on Wednesday, July 09, 2003
 

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 ")









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  onChange issue
•  Remote program execution using cgi-perl
•  Chat application
•  How to send multiple perameters in SOAP request.
•  Java code for Insert picture on the table in spreadsheet
•  Re: Problem with concatenation
•  how to genrates the crystal report by sending a id at runtime
•  help me
•  pls help me with this..


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007