Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [PHP] Problems with mail function

0 views
Skip to first unread message

John Nichel

unread,
Oct 24, 2006, 4:13:39 PM10/24/06
to php-g...@lists.php.net
Ricardo Ríos wrote:
> Hi wizards, I 'm trying to use mail function in PHP, but this function
> don't
> send the email , I have a server with postfix. Does somebody know how to
> send an email with php and postfix. Thanks in advance.
>

Does your install of postfix have a sendmail wrapper? Is it in the
normal sendmail location (/usr/bin/sendmail)? Is this on the same
machine as your php install? Does the user in which Apache is running
as have permission to invoke the sendmail wrapper?

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jni...@dotcomholdingsofbuffalo.com

Ricardo Ríos

unread,
Oct 24, 2006, 4:05:37 PM10/24/06
to php-g...@lists.php.net

Jochem Maas

unread,
Oct 24, 2006, 4:52:46 PM10/24/06
to John Nichel, php-g...@lists.php.net
John Nichel wrote:
> Ricardo Ríos wrote:
>> Hi wizards, I 'm trying to use mail function in PHP, but this function
>> don't
>> send the email , I have a server with postfix. Does somebody know how to
>> send an email with php and postfix. Thanks in advance.
>>
>
> Does your install of postfix have a sendmail wrapper? Is it in the
> normal sendmail location (/usr/bin/sendmail)? Is this on the same
> machine as your php install? Does the user in which Apache is running
> as have permission to invoke the sendmail wrapper?

what does the error msg say? is display_errors on?
is error_reporting() set to E_ALL? ...

does he eat cheese? :-)

>

Chris

unread,
Oct 24, 2006, 8:07:51 PM10/24/06
to Ricardo Ríos, php-g...@lists.php.net

Create a phpinfo page and make sure the 'sendmail_path' is set.

If that's set, you can just use php mail() as normal. The mail() command
doesn't care about what sort of MTA it uses, it just cares it knows
where it is and how to access it.

--
Postgresql & php tutorials
http://www.designmagick.com/

0 new messages