For Programmers: Free Programming Magazines  


Home > Archive > ASP > September 2004 > ASP Email and listserv subscription









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ASP Email and listserv subscription
Andy

2004-09-24, 8:55 am

Morning All,

I'm looking to put a subscribe feature on my site. The user would just
put their email address into the subscribe box and press go.

The listServer requires the email address in the message body. How do
I get the email address into a hardcoded message?

message: subscribe listname <user@domain.com>

Has anyone come across any tutorials about this? I wasn't sure as to
what to call it to do a search.

Thanks,
Andy...
Ray Costanzo [MVP]

2004-09-24, 3:55 pm

Using CDO on Windows 2000 or 2003, you could do:

<html><body>
<form method="post" action="subscribe.asp">
<input name="emailAddress" type="text">
<input type="submit">
</form></body></html>


subscribe.asp:
<%
Dim sEmail : sEmail = Request.Form("emailAddress")
Dim oCDO : Set oCDO = CreateObject("CDO.Message")
oCDO.From = sEmail
oCDO.To = "theSubscribe@address.for.thelist"
oCDO.Subject = "Hi server."
oCDO.TextBody = "subscribe listname " & sEmail
oCDO.Send
Set oCDO = Nothing
%>

Ray at work



"Andy" <andy_naylor@ncsu.edu> wrote in message
news:39a90959.0409240440.2364ee59@posting.google.com...
> Morning All,
>
> I'm looking to put a subscribe feature on my site. The user would just
> put their email address into the subscribe box and press go.
>
> The listServer requires the email address in the message body. How do
> I get the email address into a hardcoded message?
>
> message: subscribe listname <user@domain.com>
>
> Has anyone come across any tutorials about this? I wasn't sure as to
> what to call it to do a search.
>
> Thanks,
> Andy...



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com