Hello,
on 02/09/2005 11:03 PM ehendrikd said the following:
hi all
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.
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.
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?
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.
http://www.phpclasses.org/mimemessage
You also need this:
http://www.phpclasses.org/smtpclass
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html