Page 1 of 1

Replace mail() function

Posted: Mon May 21, 2007 2:55 am
by kurtenc
I am running php4/apache on windows2000. The PHP application i run uses the mail() function at numerous places in the code.

Problem is that the built-in mail() function does not support SMTP authentication. I absolutely need this as the server is situated in such a way that it cannot run its own mailserver.

Is there a way to replace the mail() function (by recompilation, a dirty hack or whatever) so that it uses the login credentials of one's choice, but otherwise works exactly as previously?

I've done some pretty hefty Google searching on the matter. There are solutions to the problem such as using the smtp.send class or PEAR mail package, but all those seem to involve a fair deal of editing the application's source code.

(The PHP application in question is WebCalendar, if that matters - maybe there's a rewritten version somewhere ready to use fancier mail functions?).

Thanks in advance!!

// Kurten

Posted: Tue May 22, 2007 11:22 am
by kurtenc
I fixed it by using the smtp_mail class and doing find-replace in the programcode. Thanks anyway...

Posted: Tue May 22, 2007 11:45 am
by RobertGonzalez

Posted: Tue May 22, 2007 11:52 am
by Luke
Swiftmailer is the beez neez. We all heavily promote its use. :D