[thelist] sending email with php

Pablo Oliva poliva at cox.net
Sat Sep 7 10:27:01 CDT 2002


--
[ Picked text/plain from multipart/alternative ]
I am trying to implement the mail function;

Here's the SMTP directive in the php.ini file:
SMTP = smtp.west.cox.net
sendmail_from = poliva at cox.net

Here's my code:

$to = $compEmail;
$subject = 'Jobs on the Road email verification';
$message = 'test';

if ( @mail( $to, $subject, $message,
"To: $compContact <$compEmail>\n" .
"From: poliva at cox.net\n" .
"MIME-Version: 1.0\n" .
"Content-type: text/html; charset=iso-8859-1" ) )
{
// email sent successfully
header ( 'Location: ../verify/emailVerification.php?sts=1' );
}
else
{
// email could not be sent
header ( 'Location: ../verify/emailVerification.php?sts=0' );
}

I am being sent to the page that is a result of an unsuccessful attempt.
Can anyone see any problems with my code, is there something that I am
missing???? Thanks for any help or light that you could shed on my
frustrating problem.

--




More information about the thelist mailing list