The problem with cgimail.dll (it looks from my cursory glance) is that you
have very little control on formatting.  ntmailer.exe allowed you to define
a text file that contained the return message.  In this case however,
because I needed loop processing, I couldn't even do that. Now that I think
about it, I had to write the entire script (ASP) from scratch because I
couldn't get anything else to work.

This code is not pretty and is offered here for you as is, where is with no
warrenties explicit or implied...yadda...yadda...yadda. Hope this helps...or
at least amuses.

HTML code
-------------
<FORM Method=post Action="http://www.mydomain.com/scripts/mailinglists.asp">
Name:<BR>
<INPUT Name="Name" ><BR>
Email Address:<BR>
<INPUT Name="EmailAddress" ><BR>
<INPUT Type=checkbox Name="List" Value="mylist" >My Mailing List<BR>
<INPUT Type=checkbox Name="List" Value="friendlist" >My Friend's List<BR>
<INPUT Type=checkbox Name="List" Value="intranet" >My Intranet List<BR>

<INPUT
Type =submit Name="Submit" Value="Subscribe" <INPUT><BR>
</FORM>

ASP code - Assumed you have the wonderfully magical ASPMail from
www.serverobjects.com If not then you will need to configure it for your
mail component.
-----------
<Script Language="VBScript" RUNAT="Server">
REM            :
REM    Project : Web Catalog
REM            :
REM       Name : MailingList.asp
REM            :
REM     Author : Cal Evans
REM            : [EMAIL PROTECTED]
REM            :
REM  Copyright : (c) 1997 Cal Evans
REM            : All Rights Reserved
REM            :
REM    Purpose : Called from a simple form pasted into index.asp, this sends
a
REM            : message to the user allowing them to reply and subscribe
REM            : to any of our mailing lists.
REM            :
REM            :
REM    Version : 1.0
REM            :
REM       Last :
REM     Update : Monday, June 08, 1998 7:09:26 PM
REM            :
REM    History : 1.0 - First deployed version
REM            :
REM      NOTES :
REM            :
</script>
<%
     Set Mailer = Server.CreateObject("SMTPsvg.Mailer")

     Mailer.ClearAllRecipients
     Mailer.AddRecipient request.form("Name"),request.form("EmailAddress")

     Mailer.ClearBodyText
     Mailer.FromAddress = "[EMAIL PROTECTED]"
     Mailer.RemoteHost  = "mail.mydomain.com"
     Mailer.Subject     = "Subscribe to mailing lists"
     lcOutString = ""

REM
REM Write out the SUBSCRIBE lines
REM
     For each List in request.form("List")
       lcOutString = lcOutString + "SUBSCRIBE " & List & " " &
request.form("Name") & vbCrLf
     Next

REM
REM Change the verbage here to suite your needs.
REM
     lcOutString = lcOutString + vbCrLf + "To subscribe to the lists above,
simply reply to this message. Please make SU    RE that the lines above are
in your reply and that on each line that starts with the word SUBSCRIBE
there is nothing before the word SUBSCRIBE.  It should start in the first
character of the line.  Many email programs will indent the reply text and
put a > before it.  If yours does this, please edit those line(s) to remove
it." & vbCrLf & vbCrLf
     lcOutString = lcOutString + "This message was sent via a web form
located at http://www.mydomain.com because somebody filled in your name and
email address. (We hope it was you!)  If you did not fill out that form, or
for some reason you received this message and do not wish to subscribe to
one of our mailing lists then do nothing.  We have not stored your email
address and you won't be hearing from us again." & vbCrLf & vbCrLf

REM
REM A better programmer would do error checking here...:)
REM
     Mailer.BodyText = lcOutString
     Mailer.SendMail

     Set Mailer = Nothing

REM
REM Send it somewhere...I just send it back to the homepage.  It was the
most confusing thing I could think of at the moment. :)
REM
response.redirect("http://www.mydomain.com")

%>

----- Original Message -----
From: Steve Pruner
To: [EMAIL PROTECTED]
Sent: Monday, November 01, 1999 2:29 PM
Subject: Re: [IMail Forum] HTML list subscribe.


Cal,

I wanted to use a HTML form using a POST or GET (see the bottom left of
www.rugsrus.com/index.htm). Maybe there is a cgi out there someone has
written?  Do you know of any?

Steve
----- Original Message -----
From: calevans.com
To: [EMAIL PROTECTED]
Sent: Monday, November 01, 1999 3:21 PM
Subject: Re: [IMail Forum] HTML list subscribe.


A couple of ways.

I use ASP to list all my lists, allow the user to check off the ones he/she
wants to join, enter their name and email address and then submit the form.
Form there, I use an ASP control to send THEM an email with all of the
subscribe messages addressed to [EMAIL PROTECTED]  All they have to do
is reply to the message.

If you don't have ASP, CF will do (probably better) and as a last case
scenario, blat or NTMailer.  (Actually, NTMailer would be a decent choice if
you can still find the free-ware version)

It's not terribly difficult.

Cal

----- Original Message -----
From: Steve Pruner
To: [EMAIL PROTECTED]
Sent: Monday, November 01, 1999 10:21 AM
Subject: [IMail Forum] HTML list subscribe.


How can you make a form to subscribe to an IMAIL list server/

Steve Pruner
The CyberDivan

Please visit http://www.ipswitch.com/support/mailing-lists.html 
to be removed from this list.

Reply via email to