nliautaud / p01contact

Create contact forms by writing simple tags. Also a plugin for GetSimple and Pico CMS.
MIT License
16 stars 15 forks source link

removing the ip from email #35

Closed meentix closed 6 years ago

meentix commented 6 years ago

Hi,

how is it possible to remove the ip address from the email? I dont need it and because of gdpr it should be removed and not stored.

Thanks for your help

nliautaud commented 6 years ago

Hello,

The ip shown in the mail is the one returned by the server, so you'll probably want to look at your server configuration to disable those logs.

https://github.com/nliautaud/p01contact/blob/0d2c7d26f9cdef260128c68f6a5023eea2d1e371/p01-contact/src/P01contact_Form.php#L353

Then, you can just edit the mail template to fit your needs.

https://github.com/nliautaud/p01contact/blob/0d2c7d26f9cdef260128c68f6a5023eea2d1e371/p01-contact/src/templates/mail_template.html#L12

meentix commented 6 years ago

So the ip is not from the user who used the form, right? Its only the server ip? So that would be no problem.

nliautaud commented 6 years ago

No, RemoteAddr is the IP address from which the user is viewing the current page, not the server one.

meentix commented 6 years ago

Okay, Ive removed the line from P01contact_Form.php and the piece from mail_template.html. Thanks.