Using SMTP with form send mail

Upgrading from 9.4.4 to 9.5 has made all forms not sending mails anymore. Wonderful?!

I activated my backup 9.4.4 and everything works fine.

After inquiring at my webhoster I learned that PHP mailer will be anyway discontinued. So I setup a testsite, upgraded to 9.5.2 and switched to SMTP.

But here, according to the logs, mails are not sent due to:

Mail «New Subscription" unsuccessful: Email rejected based on sender policy of sender domain

I looked at this 3 years old solution https://forums.concretecms.org/t/smtp-method-setup-trouble/4532/7 and I still cannot manage to have emails sent correctly.

In my site at /index.php/dashboard/system/mail/method

External SMTP
I set the email address to one withing the domain. But no success.

Can anybody tell me how to properly set the email adress.

Thanks.

This looks like a message being sent from your site and to your SMTP server, the message being generated by your SMTP server. The message: “Email rejected based on sender policy of sender domain” implies that the SMTP server is trying to verify the authenticity of the sender and it’s failing. Most likely cause is that the from email address of the message is not a valid email address.

Thank you for your kind message.
The strange thing is, that with some email addresses it works and another it bounces.
@JohntheFish writes in another thread, that gmail addresses are picky, - but yesterday, exactly a subscription with a gmail address message came through, the return mesg as well.
So, what coud it be? Just a mood?

I am confused about the sequence of events and what is generating the rejection message.

  • Are you seeing the rejection in Concrete when it’s trying to send the message?
  • Or are you seeing it from your SMTP server after it accepts the message and tries to re-send it?

If the message is in Concrete, then, all you have to do is analyze your SMTP server and it’s policies. Do you have control over this server and it’s configuration or does someone else? If someone else, you need to ask what it’s validation criteria is for accepting a message both on the from and to address. Some servers:

  • reject messages if the login account and email address are not the same
  • reject messages if the to address does not exist
  • reject messages if the from & reply to are different

and lot’s of other combinations. A analysis of the full rejection message will point you in the right direction.

If it’s from your SMTP server after attempting to send the message to it’s destination:

  • Verify your SPF, DMARC, and DKIM - MX toolbox has some amazing resources for this
    • Note that MX Toolbox will give you a “pass” for a dmarc policy of none however gmail will reject messages unless it’s set to quarantine or reject
  • Check blacklists both for domain and ip address
  • Check from/reply alignment
  • check the mood of the recipient
  • Check max send rates of your host.

Again an analysis of your smtp server logs should give you lots of details, or if not you, ask your host for help.

Thanks again David. The testmail sent from the SMTP server is fine according to hosting company. Server log seems also OK. DKIM, SPF, DMARC settings as well.

If this poses a problem I’ will not be able to solve it. the site has many logins with many email addresses. There is a small chance, that installed captcha 3 on the forms is causing confusion.
I better don’t upgrade.

In order to test the correctness of SPF, DMARC and DKIM I often use mail-tester.com :

  1. go to mail-tester.com and copy the email address displayed there
  2. In ConcreteCMS, go to Dashboard > System & Settings > Email > SMTP Method and click “Test Settings”
  3. In that dashboard page, enter the email address copied from step 1 and send a test email
  4. Go back to the mail-tester page and check your score

I’m going to check that one out - i always use mx toolbox’s mail tester @ ping@tools.mxtoolbox.com but i’m always happy to find anew one with different perspectives.

I upgraded to v.9.5.2, then it worked, with small hickup, later I removed captcha 3 and everything went fine. What exactly went wrong in 9.5 remains a mystery.
Thanks for Help.