[wp-hackers] Adding phpmailer options (smtp for example)

Callum Macdonald lists.automattic.com at callum-macdonald.com
Wed Aug 29 22:46:43 GMT 2007


G'day,

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.

Cheers,


Callum.



More information about the wp-hackers mailing list