Email header "from" with name and address


I recently tried to send the send the data of a contact form via mailgun,
which worked as expected.

The problem is, I am not able to set the “from” header to “User Name mail@domain.tld” because it’s stripped by the script (/toolkit/lib/email.php:33). Is that because of a security issue?
I’s quite annoying to receive emails from no-repy instead of Contact Form Submission.


Have you tried it with the new 2.1 beta (soon to be released)? I have the feeling there was a fix for this (or something similar, I might be mistaken) included.

Edit: Referring to that change

Ah, nice.

This really will fix this one.
Have’nt tried the beta yet, as this installation is almost in production.
But thanks for the hint.


Well, that didn’t do the job.
Line 41 validates for email, which will fail.

FILTER_VALIDATE_EMAIL will only return true on a actual email address.
Maybe there is need of an regex checking.