separator

Take a quiz or make one of your own

Use this program to generate an email from your website.


#!/usr/local/bin/perl
my $ml_pgm = '/usr/local/bin/sendmail';
# ymmv
my $ml_to = 'Info@mydomain.com';
open (MAIL, "$ml_pgm $ml_to") or die "Sendmail wouldn't open : $!\n";
print MAIL "To: $ml_to\n";
print MAIL "From: mydomain.com\n";
print MAIL "Subject: You Have eMail!\n\n";
print MAIL "Dear Visitor to mydomain.com\n\nThank you very much for dropping by. Please come see us again.\n\nYours truly,\nmydomain.com Webmaster";
close MAIL or die "Sendmail wouldn't close : $!\n";

__END__

Please note that "which sendmail" command needs to be executed from the telnet command line or the sendmail directory supplied by your server tech support folks.

A Vanilla E-Mail Script/Adding the Reply-To Address

separator

© www.thecgibin.com