Question
Mailing List From Database via Outlook
I have a table that has the names and email addresses of a
group of individuals. I want to just have an E-Mail All link or
button that with one click will open Outlook and insert all of the
names into the To: line. I know there are much better ways to do
this, but the security settings of my IIS Server prevent me from
doing anything on the server end (like PHPMail does).
At home, I did this on my own site (in PHP/MySQL) by just creating a quick binding to a table cell, adding a repeat region server behavior, stripping out the table tags, opening the properties of the E-Mail All button and then copying the entire php repeat region code into the Link box and slapping a mailto: in front of it and a semi-colon+space (the Outlook separator) at the end. It immediately worked like a charm and has done so for almost 2 years. Everytime my user database changes, the mailto: name list changes with it.
But with ASP/VBScript, it fails miserably. I get 500.100 server errors in IE. Specifically on this script call:
<% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rs_mailall.MoveNext() Wend %>
The basic Repeat Region is this (td tags sripped out mind you):
<%
While ((Repeat1__numRows <> 0) AND (NOT rs_mailall.EOF))
%>
<%=(rs_mailall.Fields.Item("email").Value)%>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rs_mailall.MoveNext()
Wend
%>
Standing alone, the repeat region works just fine.
My Modified Mailto:
<a href="mailto:<% While ((Repeat1__numRows <> 0) AND (NOT rs_mailall.EOF)) %><%=(rs_mailall.Fields.Item("email").Value)%><% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rs_mailall.MoveNext() Wend %>">E-Mail All Users</a>
As I said, doing the exact same thing on my PHP page works like a charm. What am I missing with ASP/VBScript?
Cheers
Chuck
At home, I did this on my own site (in PHP/MySQL) by just creating a quick binding to a table cell, adding a repeat region server behavior, stripping out the table tags, opening the properties of the E-Mail All button and then copying the entire php repeat region code into the Link box and slapping a mailto: in front of it and a semi-colon+space (the Outlook separator) at the end. It immediately worked like a charm and has done so for almost 2 years. Everytime my user database changes, the mailto: name list changes with it.
But with ASP/VBScript, it fails miserably. I get 500.100 server errors in IE. Specifically on this script call:
<% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rs_mailall.MoveNext() Wend %>
The basic Repeat Region is this (td tags sripped out mind you):
<%
While ((Repeat1__numRows <> 0) AND (NOT rs_mailall.EOF))
%>
<%=(rs_mailall.Fields.Item("email").Value)%>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rs_mailall.MoveNext()
Wend
%>
Standing alone, the repeat region works just fine.
My Modified Mailto:
<a href="mailto:<% While ((Repeat1__numRows <> 0) AND (NOT rs_mailall.EOF)) %><%=(rs_mailall.Fields.Item("email").Value)%><% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rs_mailall.MoveNext() Wend %>">E-Mail All Users</a>
As I said, doing the exact same thing on my PHP page works like a charm. What am I missing with ASP/VBScript?
Cheers
Chuck