You are here: irt.org | BBS | Re: Creating an autoresponder [This BBS is closed]
Posted by Jason Nugent on September 20, 1998 at 20:12:10:
In Reply to: Creating an autoresponder posted by Yvan Gagnon on September 20, 1998 at 14:07:04:
: I'm trying to customize some source code I got off the IRT
: bulletin board so that it can act like an autoresponder that
: sends an email newsletter to a person when they type their
: email address in a textbox and then click the submit button.
: I seem to have it working, however, .. I would still like to
: customize it further if possible.
: Questions:
: 1) Can the code below be customized so that it uses a cgi
: script on my server to parse and send the data to the specified
: email address instead of using mailto?
Yes... just replace the ACTION="" with the URL of a CGI script on the server. You won't need to do the onSubmit check after this.
ACTION="http://www.server.com/cgi-bin/email.pl" for example.
: 2) Is there any way I can customize the variable names in the
: input field tags so that I don't get subject=" or "message="
: in front of the values, so I have a neater, more newsletter-like
: appearance? Or would I have to create a custom cgi script
: in order to achieve this?
You need a custom CGI script to do this. The default way is to put name=value on each line, and the browser is hardcoded to achieve this
.
: 3) Is there any way I can replace the value of my hidden
: "newsletter" field with the contents of an ASCII text file which
: resides on my server in the same directory?
sure, but you would have to do this on the server, via the CGI script. You won't even need the hidden field any more, since you can just insert the contents of the file when the CGI script is run. With Perl you can read a file and print it very easily (check out my article on Reading and Writing to Files on the Server for more info).
Jason
Follow-ups:
You are here: irt.org | BBS | Re: Creating an autoresponder [This BBS is closed]