[wp-hackers] Adding phpmailer options (smtp for example)
Peter Westwood
peter.westwood at ftwr.co.uk
Thu Aug 30 06:25:56 GMT 2007
On 29 Aug 2007, at 23:46, Callum Macdonald wrote:
> One of our sites had an issue today where it was dying with the error:
> The e-mail could not be sent.
> Possible reason: your host may have disabled the mail() function...
>
> Investigating, I realise that phpmailer is bundled with WordPress
> and it's configured to use PHP's mail() function by default. That
> seems sensible, however, I think it would be useful to add some
> options to allow the user to configure it's use. For example, to
> send mail by SMTP and then specify a host (even a username/password).
>
> Before I bash out some code and send a patch, I thought I'd ask for
> feedback. Can anyone see any flaws in this plan? Would the options
> be best implemented in the options database? Which admin screen
> would be most relevant? If the user specifies an invalid server,
> how will that affect the system? Is that more or less likely than
> mail() being disabled?
>
> I think the current default is sensible, but options would be
> useful. If I don't hear anything in the next few days I'll write
> some code anyway and we can take it from there.
I don't think this kind of configuration is needed for 90% of users.
Therefore it would be better as a plugin.
I would suggest you try and write a plugin to achieve what you require.
If you find you need extra actions/filters in WordPress in order to
achieve the functionality within the plugin then let us know (tickets
in trac) and I am sure they will be added.
Cheers
westi
--
Peter Westwood <peter.westwood at ftwr.co.uk>
Blog: http://blog.ftwr.co.uk/
WordPress Plugins: http://blog.ftwr.co.uk/wordpress/
More information about the wp-hackers
mailing list