Form module disregards mailer outgoing address setting

kibmcz

Using SMTP is a workable workaround but finding out why it is not sending in this case could be worth deeper testing as it could effect others.

As per reproduction it should be reproduceable on debian 10 with the lamp stuff installed as that is what my local testing server is setup as where non signed in is not sending.

Also why the signed in messages that go through use the to address as the from address is puzzling.

dbs

I can confirm the debug infos.
But the email was correctly delivered to my gmail account with the right headers. Yes my debug info looks wrong like yours.

We have 2021. If the unsecure PHP Mail don't work right, use SMTP.
I recommand SMTP and for more trust also SPF, DMARC, DKIM
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

kibmcz

Missed edit window so can't correct mistake made in post..  Redid test and the when signed in does something odd.

The sendmail command for the notice that i sent message shows proper Envelope sender but the sendmail command for the actual delivered message shows the accounts gmail address as the Envelope sender.

Still can't make any sense why the non signed in one use the Envelope sender address for the to address tho and it does it every time.

Sending with mail()
Sendmail path: /usr/sbin/sendmail -t -i
Envelope sender: {Gmail address redacted}
To: Administrator <{Gmail address redacted}>
Subject: You have received a message about WB 13 Testing
Headers: Date: Sat, 24 Apr 2021 00:14:21 +0000From: {Gmail address redacted}Reply-To: Administrator <{Gmail address redacted}>Message-ID: <u7a3ybvQNwjFtiJU7E9g4wKaahWPXBrZgW3j8pMqPQ[at]kibmcz[dot]ca>X-Mailer: PHPMailer 6.3.0 (https://github.com/PHPMailer/PHPMailer)MIME-Version: 1.0Content-Type: multipart/alternative; boundary="b1_u7a3ybvQNwjFtiJU7E9g4wKaahWPXBrZgW3j8pMqPQ"Content-Transfer-Encoding: 8bit
Additional params: -f{Gmail address redacted}
Result: true
Sending with mail()
Sendmail path: /usr/sbin/sendmail -t -i
Envelope sender: noreply[at]kibmcz[dot]ca
To: Administrator <{Gmail address redacted}>
Subject: You have sent a forumlar via WB 13 Testing
Headers: Date: Sat, 24 Apr 2021 00:14:22 +0000From: noreply@kibmcz.caReply-To: Administrator <{Gmail address redacted}>Message-ID: <NhK7vuCqFgmV2dRcd0R8qNZPeQ8wiouZ2TlZiO1KlQ[at]kibmcz[dot]ca>X-Mailer: PHPMailer 6.3.0 (https://github.com/PHPMailer/PHPMailer)MIME-Version: 1.0Content-Type: multipart/alternative; boundary="b1_NhK7vuCqFgmV2dRcd0R8qNZPeQ8wiouZ2TlZiO1KlQ"Content-Transfer-Encoding: 8bit
Additional params: -fnoreply[at]kibmcz[dot]ca
Result: true


Sorry for the double post but had to correct the information.

kibmcz

That got something.. on the clean install of r61 on production host this is the output i got. When signed in it works proper but when not signed in it uses the from address configured in mailer settings as the to adress ignoring the recipent configured in the form settings. Also on the non signed in not sure where its getting the .com from as the default from address is set as a .ca.

Result not signed in:

Sending with mail()
Sendmail path: /usr/sbin/sendmail -t -i
Envelope sender: noreply[at]kibmcz[dot]ca
To: Guest <noreply[at]kibmcz[dot]ca>
Subject: You have received a message about WB 13 Testinga
Headers: Date: Fri, 23 Apr 2021 21:27:06 +0000From: noreply@kibmcz.caReply-To: Guest <noreply[at]kibmcz[dot]ca>Message-ID: <54QC01YAkssRqPCK12JitNPGTf9H28iVZxenBChocpQ[at]kibmcz[dot]ca>X-Mailer: PHPMailer 6.3.0 (https://github.com/PHPMailer/PHPMailer)MIME-Version: 1.0Content-Type: multipart/alternative; boundary="b1_54QC01YAkssRqPCK12JitNPGTf9H28iVZxenBChocpQ"Content-Transfer-Encoding: 8bit
Additional params: -fnoreply[at]kibmcz[dot]ca
Result: true


Result signed in:

Sending with mail()
Sendmail path: /usr/sbin/sendmail -t -i
Envelope sender: {Gmail adddress redacted}
To: Administrator <{Gmail adddress redacted}>
Subject: You have received a message about WB 13 Testing
Headers: Date: Fri, 23 Apr 2021 21:33:44 +0000From: {Gmail adddress redacted}Reply-To: Administrator <{Gmail adddress redacted}>Message-ID: <6j9Y4JY0yIC6pLo7b1RhkR7F7aB4PjHDkXGRnTnaI[at]kibmcz[dot]ca>X-Mailer: PHPMailer 6.3.0 (https://github.com/PHPMailer/PHPMailer)MIME-Version: 1.0Content-Type: multipart/alternative; boundary="b1_6j9Y4JY0yIC6pLo7b1RhkR7F7aB4PjHDkXGRnTnaI"Content-Transfer-Encoding: 8bit
Additional params: -f{Gmail adddress redacted}
Result: true

dbs

Maybe the debug mode in WB mail settings can help.
Try DEBUG_SERVER.
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

kibmcz

Well can't explain that as on my setup even with a clean install of 2.13 form email sending don't seem to work and i've tested on two different hosts (actual production host and local test both php 7.3).

On production host 2.12.x sends properly but with 2.13.x now no message even goes through.

Is this a PHP 7.3 related issue?

dbs

Hi, can't confirm.
My tests:
- domain email address in WB settings
- gmail address in form (Form message to recipient)
Tested with r61, PHP 8, smtp, php mail, as logged in user, as guest.
All emails have been sent and received.

In the email headers was the domain email address the sender.
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

kibmcz

This issue seems to still be present in the current r61 with form module starting to not sending messages at all (or google is now blocking them) starting with r60. Tested this with fresh install and behaviour replicated the upgraded test install.

Edit: Password reset properly uses the mailer settings configured outgoing address.

As outlined as before this issue could be problem for many and for my own if this issue was present on 1.13 release i would not be able to upgrade.

kibmcz


Luisehahne

Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

kibmcz

The issue is the behavior has changed from 2.12.x where it would use the default "from" address defined in mailer settings (in my case so it shows up as noreply@<domain>) for all outgoing messages.

If this is a intended change then the form module is missing the setting to set the from address separately.

As it is now if the recipient address is set to a gmail address google thinks its spam cause the from address is the same gmail address but it didn't come from a google server. This could be a issue for many people.

dbs

Hi, in 2.13 it is for flexibility reasons not automatically the system emailadress.
You are free to send the form to someone who will take care of it. E.g. a admin for this page.
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

kibmcz

The form module on 1.13.0 is taking the outgoing address from the E-mail recipient of the form settings instead of the cms configured outgoing address in mailer settings.

Same configuration on 1.12.2 uses the cms configured mailer settings outgoing address as the from field in the form module when email is sent.