repeat region not working in email
Using PC, WINDOWS XP, Dreamweaver 8, ASP, VB SCRIPT
I am trying to add a repeat region within the body of an email which is using a recordset loop to despatch mail. The repeat region displays all the names of the recipients of the emails i.e.
A copy of this email has been sent to:
user 1
user 2
user 2
etc
If I add the repeat region to Universal Email, the loop will only send an email to the 1st user
but all the repeat region names are displayed.
If I remove the repeat region the mail is sent to all recipients and the recordset loop works OK.
THIS VERSION LOOPS THROUGH THE RECORDSET OK BUT NO REPEAT:
<table width="46%" border="1" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td width="28%" class="style1"><div align="right">enquiry date: </div></td>
<td width="72%" class="style1"><div align="left"><%=(rsAFLASenq.Fields.Item("datinsert").Value)%></div></td>
</tr>
<tr>
<td class="style1"><div align="right">company: </div></td>
<td class="style1"><div align="left"><%=(rsAFLASenq.Fields.Item("strcompany").Value)%></div></td>
</tr>
<tr>
<td class="style1"><div align="right">country:</div></td>
<td class="style1"><div align="left"><%=(rsAFLASenq.Fields.Item("strcountry").Value)%></div></td>
</tr>
<tr>
<td class="style1"><div align="right"></div></td>
<td class="style1"><div align="left"><a href="http://www.agcce.com/emaillogin.asp">Visit Login Page to View Request and update Request Diary </a></div></td>
</tr>
</table>
THIS VERSION PRODUCES AN ERROR, BUT STILL SEND EMAIL AND ADDS THE REPEAT REGION BUT ONLY SENDS TO 1st RECIPIENT:
This email was sent to:
<table width="46%" border="0" cellspacing="0" cellpadding="2">
<%
While ((Repeat1__numRows <> 0) AND (NOT rsUsers.EOF))
%>
<tr>
<td><%=(rsUsers.Fields.Item("strname").Value)%></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsUsers.MoveNext()
Wend
%>
</table><br />
<table width="46%" border="1" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td width="28%" class="style1"><div align="right">enquiry date: </div></td>
<td width="72%" class="style1"><div align="left"><%=(rsPTFEenq.Fields.Item("datinsert").Value)%></div></td>
</tr>
<tr>
<td class="style1"><div align="right">company: </div></td>
<td class="style1"><div align="left"><%=(rsPTFEenq.Fields.Item("strcompany").Value)%></div></td>
</tr>
<tr>
<td class="style1"><div align="right">country:</div></td>
<td class="style1"><div align="left"><%=(rsPTFEenq.Fields.Item("strcountry").Value)%></div></td>
</tr>
<tr>
<td class="style1"><div align="right"></div></td>
<td class="style1"><div align="left"><a href="http://www.agcce.com/emaillogin.asp">Visit Login Page to View Request and update Request Diary </a></div></td>
</tr>
</table>
The tables are used for formatting of the email.
many thanks
Brian Welsh