Email header "from" with name and address

Hi,

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.

Greetings
Manuel

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 https://github.com/getkirby/toolkit/commit/4a686fbb58f6568957a9d9159ebaf2fb24bb60aa

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.

Manuel

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.