| Author |
Send web page usng ASP
|
|
| RICHARD BROMBERG 2005-03-19, 8:55 pm |
|
I am already using ASP/Cdonts to send the contents of a Form by e-mail and
would like to include a link on my page to send the page itself by e-mail
to a named recipient.
Can anyone start me in the right direction. ?
| |
| Steven Burn 2005-03-19, 8:55 pm |
| <%
Dim sTemp, sSubject, sRecipient
sTemp =3D Request.ServerVariables("url") & "?" & Request.Querystring
sSubject =3D "Whatever"
sRecipient =3D "someone@example.com"
%>
<a =
href=3D"mailto:<%=3DsRecipient%>?subject=3D<%=3DsSubject%>&body=3D<%=3DsT=
emp%>"><%=3DsTemp%></a>
--=20
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
"RICHARD BROMBERG" <dickbrom@worldnet.att.net> wrote in message =
news:IV0%d.419442$w62.76272@bgtnsc05-news.ops.worldnet.att.net...
>=20
> I am already using ASP/Cdonts to send the contents of a Form by e-mail =
and=20
> would like to include a link on my page to send the page itself by =
e-mail=20
> to a named recipient.
>=20
> Can anyone start me in the right direction. ?=20
>=20
>=20
| |
| RICHARD BROMBERG 2005-03-19, 8:55 pm |
| Thanks Steve
I didn't express myself clearly (as usual).
I want is the person looking at the web page to enter (into a form) his/her
name and the e-mail address of another person, the recipient.
The ASP program will read these and set up the "From" and "To" fields for
the Cdonts object . Then I will use Cdonts to send the e-mail.
I want to send the content of the actual page or at least the URL of the
page to the recipient.
I will try to convert my ASP code that reads a form and e-mails the content
of the form to a program that reads the senders name and the recipients
e-mail address and sends the page or the URL of the page.
Again Thanks.
R Bromberg
"Steven Burn" <somewhere@in-time.invalid> wrote in message
news:ekFX%23wMLFHA.2252@TK2MSFTNGP15.phx.gbl...
<%
Dim sTemp, sSubject, sRecipient
sTemp = Request.ServerVariables("url") & "?" & Request.Querystring
sSubject = "Whatever"
sRecipient = "someone@example.com"
%>
<a
href="mailto:<%=sRecipient%>?subject=<%=sSubject%>&body=<%=sTemp%>"><%=sTemp%></a>
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
"RICHARD BROMBERG" <dickbrom@worldnet.att.net> wrote in message
news:IV0%d.419442$w62.76272@bgtnsc05-news.ops.worldnet.att.net...
>
> I am already using ASP/Cdonts to send the contents of a Form by e-mail and
> would like to include a link on my page to send the page itself by e-mail
> to a named recipient.
>
> Can anyone start me in the right direction. ?
>
>
| |
| Steven Burn 2005-03-20, 3:56 pm |
| Oh right....... in that case;
<%
'// thispage.asp
Dim bConf
bConf =3D Request.Querystring("s")
Select Case bConf
Case "1"
sSendTo =3D Request.Form("txtTo") '// To name
sSendToMail =3D Request.Form("txtToMail") '// To e-mail
sSendFrom =3D Request.form("txtFrom") '// From name
sSendFromMail =3D Request.Form("txtFromMail") '// From mail
sSubject =3D "I sent this"
sPageURL =3D "<a href=3D" & Request.Form("txtURL") & ">" & =
Request.Form("txtURL") & "</a>"
Case Else
'// Body is stored in a hidden field
Body =3D Request.ServerVariables("sBody") & "?" & =
Request.Querystring
%>
<form action=3D"thispage.asp?bconf=3D1" method=3D"post">
<input type=3D"hidden" name=3D"txtURL" value=3D"<%=3DBody%>">
Recipient Name: <input type=3D"text" name=3D"txtTo" =
value=3D"">
Recipient Addr: <input type=3D"text" name=3D"txtToMail" =
value=3D"">
Your name: <input type=3D"text" name=3D"txtFrom" value=3D"">
Your Addr: <input type=3D"text" name=3D"txtFromMail" =
value=3D"">
<input type=3D"Submit" value=3D"submit" name=3D"btnSubmit">
</form>
<%
End Select
%>
--=20
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
"RICHARD BROMBERG" <dickbrom@worldnet.att.net> wrote in message =
news:nb3%d.153618$Th1.18434@bgtnsc04-news.ops.worldnet.att.net...
> Thanks Steve
>=20
> I didn't express myself clearly (as usual).
>=20
> I want is the person looking at the web page to enter (into a form) =
his/her=20
> name and the e-mail address of another person, the recipient.
>=20
> The ASP program will read these and set up the "From" and "To" fields =
for=20
> the Cdonts object . Then I will use Cdonts to send the e-mail.
>=20
> I want to send the content of the actual page or at least the URL of =
the=20
> page to the recipient.
>=20
> I will try to convert my ASP code that reads a form and e-mails the =
content=20
> of the form to a program that reads the senders name and the =
recipients=20
> e-mail address and sends the page or the URL of the page.
>=20
> Again Thanks.
> R Bromberg
>=20
>=20
>=20
>=20
> "Steven Burn" <somewhere@in-time.invalid> wrote in message=20
> news:ekFX%23wMLFHA.2252@TK2MSFTNGP15.phx.gbl...
> <%
> Dim sTemp, sSubject, sRecipient
> sTemp =3D Request.ServerVariables("url") & "?" & =
Request.Querystring
> sSubject =3D "Whatever"
> sRecipient =3D "someone@example.com"
> %>
>=20
> <a=20
> =
href=3D"mailto:<%=3DsRecipient%>?subject=3D<%=3DsSubject%>&body=3D<%=3DsT=
emp%>"><%=3DsTemp%></a>
>=20
> --=20
> Regards
>=20
> Steven Burn
> Ur I.T. Mate Group
> www.it-mate.co.uk
>=20
> Keeping it FREE!
>=20
> "RICHARD BROMBERG" <dickbrom@worldnet.att.net> wrote in message=20
> news:IV0%d.419442$w62.76272@bgtnsc05-news.ops.worldnet.att.net...
e-mail and[color=darkred]
e-mail[color=darkred]
>=20
>=20
| |
| RICHARD BROMBERG 2005-03-21, 3:55 pm |
| Steve
Many thanks .
Dick Bromberg
"Steven Burn" <somewhere@in-time.invalid> wrote in message
news:O0mHMFWLFHA.3832@TK2MSFTNGP12.phx.gbl...
Oh right....... in that case;
<%
'// thispage.asp
Dim bConf
bConf = Request.Querystring("s")
Select Case bConf
Case "1"
sSendTo = Request.Form("txtTo") '// To name
sSendToMail = Request.Form("txtToMail") '// To e-mail
sSendFrom = Request.form("txtFrom") '// From name
sSendFromMail = Request.Form("txtFromMail") '// From mail
sSubject = "I sent this"
sPageURL = "<a href=" & Request.Form("txtURL") & ">" &
Request.Form("txtURL") & "</a>"
Case Else
'// Body is stored in a hidden field
Body = Request.ServerVariables("sBody") & "?" &
Request.Querystring
%>
<form action="thispage.asp?bconf=1" method="post">
<input type="hidden" name="txtURL" value="<%=Body%>">
Recipient Name: <input type="text" name="txtTo" value="">
Recipient Addr: <input type="text" name="txtToMail" value="">
Your name: <input type="text" name="txtFrom" value="">
Your Addr: <input type="text" name="txtFromMail" value="">
<input type="Submit" value="submit" name="btnSubmit">
</form>
<%
End Select
%>
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
"RICHARD BROMBERG" <dickbrom@worldnet.att.net> wrote in message
news:nb3%d.153618$Th1.18434@bgtnsc04-news.ops.worldnet.att.net...
> Thanks Steve
>
> I didn't express myself clearly (as usual).
>
> I want is the person looking at the web page to enter (into a form)
> his/her
> name and the e-mail address of another person, the recipient.
>
> The ASP program will read these and set up the "From" and "To" fields for
> the Cdonts object . Then I will use Cdonts to send the e-mail.
>
> I want to send the content of the actual page or at least the URL of the
> page to the recipient.
>
> I will try to convert my ASP code that reads a form and e-mails the
> content
> of the form to a program that reads the senders name and the recipients
> e-mail address and sends the page or the URL of the page.
>
> Again Thanks.
> R Bromberg
>
>
>
>
> "Steven Burn" <somewhere@in-time.invalid> wrote in message
> news:ekFX%23wMLFHA.2252@TK2MSFTNGP15.phx.gbl...
> <%
> Dim sTemp, sSubject, sRecipient
> sTemp = Request.ServerVariables("url") & "?" & Request.Querystring
> sSubject = "Whatever"
> sRecipient = "someone@example.com"
> %>
>
> <a
> href="mailto:<%=sRecipient%>?subject=<%=sSubject%>&body=<%=sTemp%>"><%=sTemp%></a>
>
> --
> Regards
>
> Steven Burn
> Ur I.T. Mate Group
> www.it-mate.co.uk
>
> Keeping it FREE!
>
> "RICHARD BROMBERG" <dickbrom@worldnet.att.net> wrote in message
> news:IV0%d.419442$w62.76272@bgtnsc05-news.ops.worldnet.att.net...
>
>
| |
| Steven Burn 2005-03-21, 3:55 pm |
| Your welcome ;o)
--=20
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
"RICHARD BROMBERG" <dickbrom@worldnet.att.net> wrote in message =
news:4JC%d.159361$Th1.97234@bgtnsc04-news.ops.worldnet.att.net...
> Steve
>=20
> Many thanks .
>=20
>=20
> Dick Bromberg
> "Steven Burn" <somewhere@in-time.invalid> wrote in message=20
> news:O0mHMFWLFHA.3832@TK2MSFTNGP12.phx.gbl...
> Oh right....... in that case;
>=20
> <%
> '// thispage.asp
>=20
> Dim bConf
> bConf =3D Request.Querystring("s")
> Select Case bConf
> Case "1"
> sSendTo =3D Request.Form("txtTo") '// To name
> sSendToMail =3D Request.Form("txtToMail") '// To e-mail
> sSendFrom =3D Request.form("txtFrom") '// From name
> sSendFromMail =3D Request.Form("txtFromMail") '// From =
mail
> sSubject =3D "I sent this"
> sPageURL =3D "<a href=3D" & Request.Form("txtURL") & ">" & =
> Request.Form("txtURL") & "</a>"
>=20
> Case Else
> '// Body is stored in a hidden field
> Body =3D Request.ServerVariables("sBody") & "?" &=20
> Request.Querystring
> %>
> <form action=3D"thispage.asp?bconf=3D1" method=3D"post">
> <input type=3D"hidden" name=3D"txtURL" value=3D"<%=3DBody%>">
> Recipient Name: <input type=3D"text" name=3D"txtTo" =
value=3D"">
> Recipient Addr: <input type=3D"text" name=3D"txtToMail" =
value=3D"">
> Your name: <input type=3D"text" name=3D"txtFrom" value=3D"">
> Your Addr: <input type=3D"text" name=3D"txtFromMail" =
value=3D"">
> <input type=3D"Submit" value=3D"submit" name=3D"btnSubmit">
> </form>
> <%
> End Select
> %>
>=20
> --=20
> Regards
>=20
> Steven Burn
> Ur I.T. Mate Group
> www.it-mate.co.uk
>=20
> Keeping it FREE!
>=20
> "RICHARD BROMBERG" <dickbrom@worldnet.att.net> wrote in message=20
> news:nb3%d.153618$Th1.18434@bgtnsc04-news.ops.worldnet.att.net...
fields for[color=darkred]
the[color=darkred]
recipients[color=darkred]
Request.Querystring[color=darkred]
href=3D"mailto:<%=3DsRecipient%>?subject=3D<%=3DsSubject%>&body=3D<%=3DsT=
emp%>"><%=3DsTemp%></a>[color=darkred]
e-mail=20[color=darkred]
by=20[color=darkred]
>=20
>=20
|
|
|
|