Xampp + Mail

This is a discussion on Xampp + Mail within the PHP Language forums, part of the PHP Programming Forums category; Hi Experts, I'm using Xampp control for php and i set the smtp configuration in php.ini as SMTP=...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008
Bala
 
Posts: n/a
Default Xampp + Mail

Hi Experts,

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

SMTP=mail.domainserver.com
smtp_port=25

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

<?php
$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:
PHPmail";
$success = mail($mail_to, $subject, $body, $headers );
if ($success){
echo $success ;
}
else{
echo "Failure";
}
?>
Reply With Quote
  #2 (permalink)  
Old 02-26-2008
Manuel Lemos
 
Posts: n/a
Default Re: Xampp + Mail

Hello,

on 02/26/2008 04:02 AM Bala said the following:
> Hi Experts,
>
> I'm using Xampp control for php and
> i set the smtp configuration in php.ini as
>
> SMTP=mail.domainserver.com
> smtp_port=25
>
> 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
>
> <?php
> $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:
> PHPmail";
> $success = mail($mail_to, $subject, $body, $headers );
> if ($success){
> echo $success ;
> }
> else{
> echo "Failure";
> }
> ?>


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:

http://www.phpclasses.org/mimemessage

You also need these auxiliar classes:

http://www.phpclasses.org/sasl

http://www.phpclasses.org/smtpclass



--

Regards,
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/
Reply With Quote
  #3 (permalink)  
Old 02-26-2008
Bala
 
Posts: n/a
Default Re: Xampp + Mail

On Feb 26, 12:55 pm, Manuel Lemos <mle...@acm.org> wrote:
> Hello,
>
> on 02/26/2008 04:02 AM Bala said the following:
>
>
>
> > Hi Experts,

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

>
> > SMTP=mail.domainserver.com
> > smtp_port=25

>
> > 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

>
> > <?php
> > $mail_to = "t...@gmail.com";
> > $mail_from= "t...@yahoo.com";
> > $subject = "Testing";
> > $body = "Testing Mail for Xampp";
> > $headers = "Return-Path: $mail_from\nFrom: $mail_from\nX-Mailer:
> > PHPmail";
> > $success = mail($mail_to, $subject, $body, $headers );
> > if ($success){
> > echo $success ;
> > }
> > else{
> > echo "Failure";
> > }
> > ?>

>
> 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:
>
> http://www.phpclasses.org/mimemessage
>
> You also need these auxiliar classes:
>
> http://www.phpclasses.org/sasl
>
> http://www.phpclasses.org/smtpclass
>
> --
>
> Regards,
> Manuel Lemos
>
> PHP professionals looking for PHP jobshttp://www.phpclasses.org/professionals/
>
> PHP Classes - Free ready to use OOP components written in PHPhttp://www.phpclasses.org/


Thanks a lot Manuel Lemos, you saved my time loads. :)
Reply With Quote
  #4 (permalink)  
Old 02-26-2008
Jerry Stuckle
 
Posts: n/a
Default Re: Xampp + Mail

Bala wrote:
> On Feb 26, 12:55 pm, Manuel Lemos <mle...@acm.org> wrote:
>> Hello,
>>
>> on 02/26/2008 04:02 AM Bala said the following:
>>
>>
>>
>>> Hi Experts,
>>> I'm using Xampp control for php and
>>> i set the smtp configuration in php.ini as
>>> SMTP=mail.domainserver.com
>>> smtp_port=25
>>> 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
>>> <?php
>>> $mail_to = "t...@gmail.com";
>>> $mail_from= "t...@yahoo.com";
>>> $subject = "Testing";
>>> $body = "Testing Mail for Xampp";
>>> $headers = "Return-Path: $mail_from\nFrom: $mail_from\nX-Mailer:
>>> PHPmail";
>>> $success = mail($mail_to, $subject, $body, $headers );
>>> if ($success){
>>> echo $success ;
>>> }
>>> else{
>>> echo "Failure";
>>> }
>>> ?>

>> 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:
>>
>> http://www.phpclasses.org/mimemessage
>>
>> You also need these auxiliar classes:
>>
>> http://www.phpclasses.org/sasl
>>
>> http://www.phpclasses.org/smtpclass
>>
>> --
>>
>> Regards,
>> Manuel Lemos
>>
>> PHP professionals looking for PHP jobshttp://www.phpclasses.org/professionals/
>>
>> PHP Classes - Free ready to use OOP components written in PHPhttp://www.phpclasses.org/

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


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.
jstucklex@attglobal.net
==================

Reply With Quote
  #5 (permalink)  
Old 02-27-2008
Bala
 
Posts: n/a
Default Re: Xampp + Mail

On Feb 26, 3:45 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Bala wrote:
> > On Feb 26, 12:55 pm, Manuel Lemos <mle...@acm.org> wrote:
> >> Hello,

>
> >> on 02/26/2008 04:02 AM Bala said the following:

>
> >>> Hi Experts,
> >>> I'm using Xampp control for php and
> >>> i set the smtp configuration in php.ini as
> >>> SMTP=mail.domainserver.com
> >>> smtp_port=25
> >>> 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
> >>> <?php
> >>> $mail_to = "t...@gmail.com";
> >>> $mail_from= "t...@yahoo.com";
> >>> $subject = "Testing";
> >>> $body = "Testing Mail for Xampp";
> >>> $headers = "Return-Path: $mail_from\nFrom: $mail_from\nX-Mailer:
> >>> PHPmail";
> >>> $success = mail($mail_to, $subject, $body, $headers );
> >>> if ($success){
> >>> echo $success ;
> >>> }
> >>> else{
> >>> echo "Failure";
> >>> }
> >>> ?>
> >> 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:

>
> >>http://www.phpclasses.org/mimemessage

>
> >> You also need these auxiliar classes:

>
> >>http://www.phpclasses.org/sasl

>
> >>http://www.phpclasses.org/smtpclass

>
> >> --

>
> >> Regards,
> >> Manuel Lemos

>
> >> PHP professionals looking for PHP jobshttp://www.phpclasses.org/professionals/

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

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

>
> A much better class is phpmailer. Seehttp://sourceforge.net/projects/phpmailer.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================


Hi Jerry,

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

regards,
Bala
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:20 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0