As a matter of fact, I have install XMail and try to use PHPMailer to
send the email but it's always rejected by the mail server. The reason
is relay failed. I have a webmail software that running on the same
server call UebiMiau which uses PHPMailer to send email, and it works.
The code that I use are as follows.
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->IsHTML(false);
$mail->Charset = "iso-8859-1";
$mail->timezone = date("O");
$mail->From = 'stooi@xxxxxxxxxxxxxxxx';
$mail->FromName = "ST Ooi";
$mail->Host = "localhost";
$mail->Port = 25;
$mail->Hostname = "localhost";
$mail->Subject = "Send mail from laser-compo.com";
$mail->Body = stripslashes("Send mail trial");
$mail->AddAddress('ooisootuck@xxxxxxxxx', 'Patrick Ooi');
$mail->AddReplyTo('stooi@xxxxxxxxxxxxxxxx', 'ST Ooi');
$mail->Send()
?>
Any help would be appreciated.
Thanks
ST Ooi
ST Ooi wrote:
Hi,
How can I setup my mail server so that I can use mail() function in PHP?
I'm running WindowsXP Pro.
Thanks
ST Ooi
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php