PDA

View Full Version : how to implement autoresponder?


nhasbek
12-28-2002, 12:01 AM
Hello,
I am using a basic javascript "orderform" that sends checked off info to an email address.
As I understand there is no method to implement an autoresponder through the use of javascript.
So my question is how can I do this with perl/cgi, and are there any ready to use scripts?

Regards
nhasbek

Philip M
12-28-2002, 03:20 PM
Yes, you need cgi for this. There are plenty of autoresponder scripts, try www.hotscripts.com.

Or you can alter an existing script such as Matt's ForMail.pl
to include an autoresponder.

Example:-



sub send_ack {

# Open The Mail Program for auto acknowledgement #
open(MAIL,"|$mailprog -t");

print MAIL "From: Autoresponder\@yourdomain.com\n";
print MAIL "To: $Config{'Email_Address'} ($Config{'CustomerName'})\n";

print MAIL "Subject: Thank you for your order!\n\n\n";

print MAIL "Acknowledgement of receipt of your order.\n\n";

print MAIL "$date\n\n";

print MAIL "Text of response message here.\n";

close (MAIL);
}