suedree
06-01-2007, 08:59 AM
Hai... I'm new in this forum.. I need help in php email. I've got sick searching around the net about this but yet I can't find any solution. So if there anybody out there would help me, I will really appreciate.
1st example
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port=25
; For Win32 only.
sendmail_from = me@localhost.com
php file :
<?php
$to = 'serene@gmail.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@localhost.com' . "\r\n" .
'Reply-To: webmaster@localhost.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message,$header);
?>
when I use this one, no error appear, but the email itself does not sent.
2nd example
[mail function]
; For Win32 only.
SMTP = mail.example.com
smtp_port=25
; For Win32 only.
sendmail_from = me@example.com
php file
<?php
$to = 'serene@gmail.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message,$header);
?>
an error appear
Warning: Server Error in c:\apache\htdocs\e-score\test_email.php on line 13
and line 13 : mail($to, $subject, $message,$header);
anybody have any idea on how to fix this one????
1st example
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port=25
; For Win32 only.
sendmail_from = me@localhost.com
php file :
<?php
$to = 'serene@gmail.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@localhost.com' . "\r\n" .
'Reply-To: webmaster@localhost.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message,$header);
?>
when I use this one, no error appear, but the email itself does not sent.
2nd example
[mail function]
; For Win32 only.
SMTP = mail.example.com
smtp_port=25
; For Win32 only.
sendmail_from = me@example.com
php file
<?php
$to = 'serene@gmail.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message,$header);
?>
an error appear
Warning: Server Error in c:\apache\htdocs\e-score\test_email.php on line 13
and line 13 : mail($to, $subject, $message,$header);
anybody have any idea on how to fix this one????