943,987 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 3796
  • ASP RSS
Mar 22nd, 2005
0

repeat region into declared variable (jmail body)

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 2
Junior Poster
william_stam is offline Offline
131 posts
since Mar 2005
Mar 22nd, 2005
0

Re: repeat region into declared variable (jmail body)

ASP Syntax (Toggle Plain Text)
  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. %>
Reputation Points: 262
Solved Threads: 68
Veteran Poster
hollystyles is offline Offline
1,181 posts
since Feb 2005
Mar 22nd, 2005
0

Re: repeat region into declared variable (jmail body)

Thanx a million.

How could i have been that stupid!!! I have done this millions of times (not for the same reason though)
Reputation Points: 10
Solved Threads: 2
Junior Poster
william_stam is offline Offline
131 posts
since Mar 2005
Mar 22nd, 2005
0

Re: repeat region into declared variable (jmail body)

Don't be so hard on yourself, we all have days like this, that's what communities like this are for.
Reputation Points: 262
Solved Threads: 68
Veteran Poster
hollystyles is offline Offline
1,181 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: recordset from multiple checkbox values
Next Thread in ASP Forum Timeline: need help on I/O in AsP(ASAP PLEASE)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC