Bramernic
Member
Posted 2 years ago #
My host requires that the from address is passed to the PHP mail() function using "-f address@mydomain.com" in the additional parameters. I found a variable $Sender in wp-includes/class-phpmailer.php which said if set would be sent using -f. It works fine. But...
Is this something which might get overwritten by upgrades? Is there another way of doing this?
Version is 2.9.2 (which isn't in the dropdown list above).
Ashfame
Member
Posted 2 years ago #
Why not use the wp_mail() function instead?
Bramernic
Member
Posted 2 years ago #
I might be missing something, but isn't wp-mail concerned with accepting posts by email? I'm talking about sending registration and lost password emails.
Ashfame
Member
Posted 2 years ago #
wp_mail takes care of the job of sending emails only. It uses the PHP's mail function too but wp_mail is also pluggable.
When working withing WordPress environment, I use wp_mail()
Bramernic
Member
Posted 2 years ago #
Sorry, I must be appearing a bit dumb here. Can you explain exactly what you are suggesting. Is it just a plug-in? If yes, which one? Or are you suggesting I should write my own?
Bramernic
Member
Posted 2 years ago #
Cheers samboll. I now understand what is being suggested.