Re: No SMTP server? Can't get mail()

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

 



Paul S wrote:

> On Fri, 21 Jan 2011 13:41:21 +0700, Peter Lind <peter.e.lind@xxxxxxxxx>
> wrote:
> 
>> Probably not the solution you were looking for, but I've always found
>> mail()
>> very unstable and I tend to use a mail library instead. Like phpmailer or
>> swiftmailer. Easier to configure and figure out problems with.
>>
>> Regards
>> Peter
> 
> Peter, that is warranted advice here.
> 
> I'm a little new to PHP. I'm set up to develop Apache/PHP/MySQL on my PC
> uploading results to a unix server. My situation here is that I am trying
> to get a PHP Mailing List program running for a friend's business web site
> (on unix). That program has 2 options for mailing: 1) mail()/SMTP and
> 2) phpmailer options. Mail()/SMTP works, at least, on my PC. But I can't
> get either of
> the two emailing options to work on the UNIX server. (Whatever those mail
> problems are, it is mangled with odd PHP/MySQL problems on unix).
> I'm just 'back here' starting debugging with the mail()/SMTP option on
> unix and my conclusion based on feedback above (thank you) is that email
> IS reaching the unix SMTP server but is not being forwarded (and that's
> unresolved now).
> 
> My mentioned "SMTP server echo problem" is irrelevant. Maybe they fixed it
> last night, or maybe I was smoking something yesterday. It IS echoing
> correctly.
> I finally figured out that part of my problem was misunderstanding a
> warning
> message caused by my not single quoting SMTP (yikes!).
> 
> Or maybe I was just
> enraged over my lack of success all day yesterday to confirm Apache server
> information on the unix server (which would help me guarantee that I have
> the same Apache/PHP/MySQL configurations between the PC and unix servers).
> But today the SMTP server info IS echo'd on the unix server. From the Unix
> server ...
> 

Nobody seems to have mentioned it, but the SMTP info is only needed on a Win
system. The following is an extract from a default php.ini file:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@xxxxxxxxxxx

; For Unix only.  You may supply arguments as well
(default: "sendmail -t -i").
;sendmail_path =

; Force the addition of the specified parameters to be passed as extra
parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

mail() should be functional; if mail() is returning true then your next step
in the debug process would be to check the mail logs, if they are
accessible to you.

On the other hand, using an SMTP class will give you a bit more
functionality.




Cheers
-- 
David Robley

Supernovae are a Blast
Today is Pungenday, the 23rd day of Chaos in the YOLD 3177. 


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