Re: How to setup the mail server so that I can use mail() function
| From: | ST Ooi | Date: | Tue, 07 Jun 2005 14:44:04 +0000 |
| Subject: | Re: How to setup the mail server so that I can use mail() function | ||
| References: | 1 | Groups: | php.windows php.windows |
| Request: | Send a blank email to php-windows+get-26078@lists.php.net to get a copy of this message | ||
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@shop-streets.com';
$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@yahoo.com', 'Patrick Ooi');
$mail->AddReplyTo('stooi@shop-streets.com', '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