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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



axaflaxar
Novice

Mar 17, 2004, 6:35 AM

Post #1 of 2 (665 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?

@gold=split(/&/,$buffer);
foreach $ab (@gold) {
($le,$ri)=split(/=/,$ab);
$ri=~tr/+/ /;
$ri=~s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
$Regis{$le}=$ri;
}
open(TECH,">>./TEXTFILES/CO4ACCTS.txt");
open(MAIL, "|/usr/lib/sendmail -oi -t ")|| die "Cannot start sendmail: $!\n";

$email='Cyoung2112@aol.com';


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",

"Friday","Saturday");
@months = ("January","February","March","April","May","June",

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


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

&
\n";
close(TECH);
print qq ~CLICK HERE(<A href="http://www.chemtroninc.com/CO4ACCTSLINKS.HTML">CO4ROUTES.HTML</A>)~;


davorg
Thaumaturge / Moderator

Mar 19, 2004, 9:58 AM

Post #2 of 2 (659 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
http://www.dave.org.uk/
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