trewknowledge / GDPR

This plugin is meant to assist a Controller, Data Processor, and Data Protection Officer (DPO) with efforts to meet the obligations and rights enacted under the GDPR.
https://wordpress.org/plugins/gdpr/
GNU General Public License v2.0
150 stars 43 forks source link

Change email sender #231

Open alandete opened 6 years ago

alandete commented 6 years ago

Best regard.

When a user requests the download of their data an email is sent with the links from which to download the information, this message in our installation is sent using the email account wordpress@mydomain .com.

email sender

How can we change the sender to use a real account of our website?

In our installation we use Wordpress 4.9.8

Thank you

jnorell commented 6 years ago

Per a quick look at GDPR_Email::send() it calls wp_mail(), so you can use the ‘wp_mail_from’ and ‘wp_mail_from_name’ hooks (per https://developer.wordpress.org/reference/functions/wp_mail/). As for when to call do that, try the gdpr_do_not_reply_address filter (you don't have to change the return value to that filter if you don't want/need to, just call the apply_action()'s then).