repeat region into declared variable (jmail body)

Reply

Join Date: Mar 2005
Posts: 131
Reputation: william_stam is an unknown quantity at this point 
Solved Threads: 2
william_stam's Avatar
william_stam william_stam is offline Offline
Junior Poster

repeat region into declared variable (jmail body)

 
0
  #1
Mar 22nd, 2005
Hi

I have an application that sends an email based on the results of the recordset.

How do you get a repeat region (loop) into the body of a email.

<%
Name = "Press-Store"
SenderEmail = "awsdesigns@gmail.com"
Subject = "Press-Store ~ File Uploaded ("&filename&" - "&SetBytes&")"
Recipient = (RSp.Fields.Item("email").Value)
Body =

:cry:
'this bit i need in the declared variable (Body)

<%
While ((Repeat3__numRows <> 0) AND (NOT RSfiles.EOF))
%>
<%=(RSfilesus.Fields.Item("filename").Value)%><p>
<%
Repeat3__index=Repeat3__index+1
Repeat3__numRows=Repeat3__numRows-1
RSfiles.MoveNext()
Wend
%>

:rolleyes:

Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "localhost"
JMail.Sender = Senderemail
JMail.Subject = Subject
JMail.AddRecipient Recipient
JMail.ContentType = "text/html"
JMail.Body = Body
JMail.Priority = 3
JMail.Execute
%>

I know this code is far from right but it is basicaly what i need help with
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: repeat region into declared variable (jmail body)

 
0
  #2
Mar 22nd, 2005
  1. Body = ""
  2.  
  3.  
  4. <%
  5. While ((Repeat3__numRows <> 0) AND (NOT RSfiles.EOF))
  6.  
  7. Body = Body & RSfilesus.Fields.Item("filename").Value & "<p>"
  8.  
  9. Repeat3__index=Repeat3__index+1
  10. Repeat3__numRows=Repeat3__numRows-1
  11. RSfiles.MoveNext()
  12. Wend
  13. %>
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 131
Reputation: william_stam is an unknown quantity at this point 
Solved Threads: 2
william_stam's Avatar
william_stam william_stam is offline Offline
Junior Poster

Re: repeat region into declared variable (jmail body)

 
0
  #3
Mar 22nd, 2005
Thanx a million.

How could i have been that stupid!!! I have done this millions of times (not for the same reason though)
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: repeat region into declared variable (jmail body)

 
0
  #4
Mar 22nd, 2005
Don't be so hard on yourself, we all have days like this, that's what communities like this are for.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC