Blocs 5 Contact Form SMTP From Field

Running Blocs v5.2.3. Added a Contact Form.
Added SMTP server to Mail Server Manager and used that for Server Type.
And sending works fine :clap: , BUT:
It seems the From field defined in Blocs is not used to define From: in the generated PHPMailer script, it uses the SMTP username instead when calling PHPMailer:

$mail->setFrom($smtp_username, 'Site Name from Project Setting');

Not sure if I should define this as a feature request or bug report? :nerd_face: :blush:

So, I guess I’ll need to change the script and make it immutable on the server, to prevent Blocs/FTP from overwriting the file later … :innocent:

Actually, I’m not sure it is a bug. Or something that you’d want in any case…

Most spamfilters and mailservers do not like it at all if the from-address differs from the mailbox sending the message in reality (the smtp username in this case). Changing this would in essence be e-mail-spoofing, which is a common spamming technique.

When mails manipulated in such a manner arrive in our spam filter (at the hosting group I work for), they immediately get an increased spam score assigned…

I do know the dangers/proc&cons of having different From: and envelope sender (added as X-Authenticated-Id: with our SMTP servers). I never let the forms send to user submitted email addresses, so it will only send authenticated SMTP to our own domain. Hence no deliverability issues.

As long as the Blocs GUI allows me to define From separate from the SMTP authentication, I’ll consider it a bug if the generated script doesn’t use that value for anything: :sweat_smile: