joey102030 Posted February 14, 2014 Share Posted February 14, 2014 I know it is standard for a PHP setup to have a working mail() function, but I'm doing some work on a server where the local SMTP server has been disabled. While it's fairly trivial to set the SMTP server global variable to a remote server, it's impossible to setup authentication into the remote SMTP server. Therefore it would be useful to be able to hook into any functions which send email (eg forgotten password for admin login) and override it with phpMailer (or similar). 2 Link to comment Share on other sites More sharing options...
horst Posted February 16, 2014 Share Posted February 16, 2014 (edited) I find this useful. And I have searched the core code (wire) and found only three function calls: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/shutdown.php#L73 https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessForgotPassword.module#L166 https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Fieldtype/FieldtypeComments/FieldtypeComments.module#L290 It could be replaced by a hookable function called pwMail() or something like that. public function ___pwMail($to, $subject, $message, $additional_headers=null, $additional_parameters=null) { return @mail($to, $subject, $message, $additional_headers, $additional_parameters); } Edited February 16, 2014 by horst 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now