Xampp + Mail

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi Experts,

I'm using Xampp control for php and
i set the smtp configuration in php.ini as


but still i got an error like this.

Warning: mail() [function.mail]: SMTP server response: 503 This mail
server requires authentication when attempting to send to a non-local
e-mail address. Please check your mail client settings or contact your
administrator to verify that the domain or address is defined for this
server. in C:\xampp\htdocs\epsylonpes\test.php on line 7

and on test.php file

   $mail_to  = "test@gmail.com";
   $mail_from= "test@yahoo.com";
   $subject = "Testing";
   $body = "Testing Mail for Xampp";
   $headers = "Return-Path: $mail_from\nFrom: $mail_from\nX-Mailer:
   $success = mail($mail_to, $subject, $body, $headers  );
   if ($success){
    echo $success ;
    echo "Failure";

Re: Xampp + Mail


on 02/26/2008 04:02 AM Bala said the following:
Quoted text here. Click to load it

The PHP mail function does not support SMTP authentication. You may want
to try a replacement for the mail function called smtp_mail() that comes
with the MIME message package. It is an equivalent function, except that
you can configure the SMTP authentication user and password. Take a look
at the test_smtp_mail.php example script:


You also need these auxiliar classes:




Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals /

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org /

Re: Xampp + Mail

Quoted text here. Click to load it

Thanks a lot Manuel Lemos, you saved my time loads. :)

Re: Xampp + Mail

Bala wrote:
Quoted text here. Click to load it

A much better class is phpmailer.  See
http://sourceforge.net/projects/phpmailer .

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: Xampp + Mail

Quoted text here. Click to load it
Hi Jerry,

Thanks for the post, it looks easy and works well thanks.


Site Timeline