Replacing mail() function?

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
nibl
Forum Newbie
Posts: 1
Joined: Wed Mar 05, 2008 6:57 am

Replacing mail() function?

Post by nibl »

Is there a way to wrap or redirect PHP's native mail() function so it would use Swift Mailer instead?

Most PHP apps use mail(). Can you redirect them, or have Swift Mailer pose as mail()?

Our goal is to avoid using sendmail altogether. Would Swift Mailer achieve this?
I'm quite a PHP newbie so examples would be great. Thanks.

Marcus
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Replacing mail() function?

Post by Chris Corbyn »

You can avoid sendmail by using Swift, but Swift cannot pose as the mail() function no. At least, not without runkit or something patched into PHP.
Post Reply