CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
Still having problems sending email... Help?



Mar 17, 2004, 6:35 AM

Post #1 of 2 (673 views)
Still having problems sending email... Help? Can't Post

I worked on my code. However, my script is not sending the e-mail. I want it to do 2 things which is right to the text file which it is doing and send an e-mail which it is not.I am not getting any error messages. Will the e-mail be sent immediately? Would someone look at my code please?

foreach $ab (@gold) {
$ri=~tr/+/ /;
open(MAIL, "|/usr/lib/sendmail -oi -t ")|| die "Cannot start sendmail: $!\n";


print MAIL "To: $email \n";
print MAIL "Subject: New Clockin\n";
print MAIL "Clockin=$days[$wday], $months[$mon] $mday, $year, $timey:$timei:$timee\n";

close (MAIL);
print "Content-type: text/html\n\n";
@days = ("Sunday","Monday","Tuesday","Wednesday","Thursday",

@months = ("January","February","March","April","May","June",

"July","August","September","October","November", "December");

@days = ("Sunday","Monday","Tuesday","Wednesday","Thursday",
@months = ("January","February","March","April","May","June",
($sec,$min,$hr,$mday,$mon,$year,$wday,$yday,$isdst) =
$year = $year + 1900;
print TECH
Clocked in at $days[$wday], $months[$mon] $mday, $year, $timey:$timei:$timee&

print qq ~CLICK HERE(<A href="">CO4ROUTES.HTML</A>)~;

Thaumaturge / Moderator

Mar 19, 2004, 9:58 AM

Post #2 of 2 (667 views)
Re: [axaflaxar] Still having problems sending email... Help? [In reply to] Can't Post

There are a number of problems with your code, but none of them should prevent an email from being sent. Have you checked the mail server's sendmail logs?

Dave Cross, Perl Hacker, Trainer and Writer
Get more help at Perl Monks


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives