Re: mail() function HELP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please include the list when replying. And please don't top-post, it makes proper quoting difficult.

On 4 Mar 2008, at 22:10, Sofia Jacob (CA) wrote:
Yes, I did that first and I get the error:

Warning: mail() [function.mail]: Failed to connect to mailserver at "mail.yahoo.ca" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\php_sandbox \user_auth_fns.php on line 170 (I should told you that before, sorry!!) and then I started to look at php web site and I found:

sendmail_path string
Where the sendmail program can be found, usually /usr/sbin/sendmail or /usr/lib/sendmail. configure does an honest attempt of locating this one for you and set a default, but if it fails, you can set it here.

Systems not using sendmail should set this directive to the sendmail wrapper/replacement their mail system offers, if any. For example, » Qmail users can normally set it to /var/qmail/bin/sendmail or/var/ qmail/bin/qmail-inject.

qmail-inject does not require any option to process mail correctly.

This directive works also under Windows. If set, smtp, smtp_port and sendmail_from are ignored and the specified command is executed.

My mistake, the comments in the INI file really should be changed to reflect that.

Given that your problem is that you haven't uncommented that line as Shawn said. Remove the ; from the start of that line, restart your we server and if the manual isn't lying it should work.

Incidentally, it probably didn't like the Yahoo settings you used because that port is for SMTP over SSL which PHP doesn't support.

-Stut

--
http://stut.net/

----- Original Message -----
From: "Stut" <stuttle@xxxxxxxxx>
To: "Sofia Jacob (CA)" <jacobsofia@xxxxxxxx>
Cc: <php-general@xxxxxxxxxxxxx>
Sent: Tuesday, March 04, 2008 4:57 PM
Subject: Re:  mail() function HELP

> On 4 Mar 2008, at 21:18, Sofia Jacob (CA) wrote:
>> I'm getting problems with the mail() function.
>>
>> ERROR:
>>
>> Warning: mail() [function.mail]: Failed to connect to mailserver at
>> "" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or >> use ini_set() in C:\wamp\www\php_sandbox\user_auth_fns.php on line 170
>>
>>
>> I'm using Windows XP prof. and WAMP5 -server
>>
>> Here what I did:
>>
>> 1) I download sendmail.zip from http://glob.com.au/sendmail/
>>
>> 2) I unzip this in a folder on c:\wamp\sendmail
>>
>> 3) I edited  PHP.INI file
>>
>> [mail function]
>> ; For Win32 only.
>> SMTP =
>> smtp_port =
>>
>> ; For Win32 only.
>> ;sendmail_from =
>>
>> ; For Unix only.  You may supply arguments as well (default:
>> "sendmail -t -i").
>> ;sendmail_path = "C:\wamp\sendmail\sendmail.exe -t"
>
> I don't mean to be rude, but what part of "For Unix only" confused you?
>
> You need to point the "For Win32 only" settings at a mail server on
> Windows. The error message pretty clearly states that it's trying to
> connect to the server specified in those settings.
>
> -Stut
>
> --
> http://stut.net/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux