| | |
repeat region into declared variable (jmail body)
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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
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
ASP Syntax (Toggle Plain Text)
Body = "" <% While ((Repeat3__numRows <> 0) AND (NOT RSfiles.EOF)) Body = Body & RSfilesus.Fields.Item("filename").Value & "<p>" Repeat3__index=Repeat3__index+1 Repeat3__numRows=Repeat3__numRows-1 RSfiles.MoveNext() Wend %>
![]() |
Similar Threads
- change values of repeat region textfield (JavaScript / DHTML / AJAX)
- Email Web Page Content (ASP.NET)
- Use variable within Insert side of FormView (ASP.NET)
- Help with asp form will not display contact information (ASP)
- Very new to ASP (ASP)
Other Threads in the ASP Forum
- Previous Thread: recordset from multiple checkbox values
- Next Thread: need help on I/O in AsP(ASAP PLEASE)
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection diagnostics dreamweaver excel fso iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit webserver windows7






