Author Topic: Form module disregards mailer outgoing address setting  (Read 927 times)

Offline kibmcz

  • Posts: 237
  • Gender: Male
    • KComputer  Zone
Form module disregards mailer outgoing address setting
« on: January 25, 2021, 02:18:04 PM »
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.

Offline dbs

  • Betatester
  • **
  • Posts: 8650
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Form module disregards mailer outgoing address setting
« Reply #1 on: January 26, 2021, 12:23:28 PM »
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.

Offline kibmcz

  • Posts: 237
  • Gender: Male
    • KComputer  Zone
Re: Form module disregards mailer outgoing address setting
« Reply #2 on: January 26, 2021, 09:59:38 PM »
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.
« Last Edit: January 26, 2021, 10:08:47 PM by kibmcz »

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4453
  • Gender: Male
Re: Form module disregards mailer outgoing address setting
« Reply #3 on: January 27, 2021, 11:26:36 AM »
I'm working on it to found a solution

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

Offline kibmcz

  • Posts: 237
  • Gender: Male
    • KComputer  Zone
Re: Form module disregards mailer outgoing address setting
« Reply #4 on: January 29, 2021, 02:28:35 AM »
Cool thanks keep me updated on this issue.

Offline kibmcz

  • Posts: 237
  • Gender: Male
    • KComputer  Zone
Re: Form module disregards mailer outgoing address setting
« Reply #5 on: April 23, 2021, 09:52:46 PM »
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.

Offline dbs

  • Betatester
  • **
  • Posts: 8650
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Form module disregards mailer outgoing address setting
« Reply #6 on: April 23, 2021, 10:54:16 PM »
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.

Offline kibmcz

  • Posts: 237
  • Gender: Male
    • KComputer  Zone
Re: Form module disregards mailer outgoing address setting
« Reply #7 on: April 23, 2021, 11:09:02 PM »
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?

Offline dbs

  • Betatester
  • **
  • Posts: 8650
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Form module disregards mailer outgoing address setting
« Reply #8 on: April 23, 2021, 11:17:09 PM »
Maybe the debug mode in WB mail settings can help.
Try DEBUG_SERVER.

Offline kibmcz

  • Posts: 237
  • Gender: Male
    • KComputer  Zone
Re: Form module disregards mailer outgoing address setting
« Reply #9 on: April 23, 2021, 11:39:51 PM »
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:

Code: [Select]
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:

Code: [Select]
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
« Last Edit: April 23, 2021, 11:45:53 PM by kibmcz »

Offline kibmcz

  • Posts: 237
  • Gender: Male
    • KComputer  Zone
Re: Form module disregards mailer outgoing address setting
« Reply #10 on: April 24, 2021, 02:27:32 AM »
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.

Code: [Select]
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.

Offline dbs

  • Betatester
  • **
  • Posts: 8650
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Form module disregards mailer outgoing address setting
« Reply #11 on: April 24, 2021, 07:42:38 AM »
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

Offline kibmcz

  • Posts: 237
  • Gender: Male
    • KComputer  Zone
Re: Form module disregards mailer outgoing address setting
« Reply #12 on: April 26, 2021, 02:42:52 AM »
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.