Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- mail() on linux to use other smtp server
February 9, 2005, 11:03 pm
rate this thread
i have written a php site that uses the mail() on windows and i had to
state in the php.ini file which smtp server to use.
have now migrated this site to a redhat 9 server, but i still want the
emails to be sent via the smtp server i stated earlier.
this may infact be a sendmail question, im not sure, (perhaps changing
sendmail_path in php.ini) but has anyone managed to send email via
mail() in php, on a linux box, that uses an external smtp server?
Re: mail() on linux to use other smtp server
on 02/09/2005 11:03 PM ehendrikd said the following:
Why? You do not need necessarily to relay the messages in a SMTP server.
Sendmail can send the message for you directly to the recipient SMTP server.
No, I suppose you can configure sendmail to relay its messages to an
intermediate SMTP server if you really have to but that is not something
that you can configure from the sendmail command line arguments in php.ini .
If you really have to relay the messages to a SMTP server, you may want
to try this class that comes with a wrapper function named smtp_mail()
that works exactly like the mail function but lets you configure a SMTP
server to relay your messages.
You also need this:
PHP Classes - Free ready to use OOP components written in PHP
PHP Reviews - Reviews of PHP books and other products
Metastorage - Data object relational mapping layer generator