XF 2.1 SMTP code 550 error regarding Gmail when I don't use Gmail

Pseudonym

Member
So I've just been refining my email settings after a recent import. I've decided to go the SMTP route and configured everything accordingly. The email test script runs successfully without any errors. I thought I would try the contact us form to check that it's actually working. I didn't receive any email after multiple attempts so logged into the ACP to find the below error being generated.

  • Swift_TransportException: Email to REDACTED failed: Expected response code 250 but got code "550", with message "550 sorry, you do not have permission to send email from gmail.com "
  • src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:383
  • Generated by: Unknown account
  • Jun 26, 2020 at 10:31 PM

The error states that I do not have permission to send email from gmail.com - but I do not use Gmail for my site. I've set up SMTP accounts @mydomain and the email address the contact us form is attempting to send to is @mydomain. There is no gmail.com email address anywhere within my settings as far as I can tell.

Does anyone have any idea what is going on? If I was actually using Gmail I could understand there could be a multitude of reason for this error. But as I'm neither using Gmail nor trying to send an email from or to Gmail I'm a little perplexed in trying to figure out the source of the problem.

Any input is gladly appreciated.
 
OK I actually figured it out. It was a setting I had enabled. It was my own host limiting the use of the service as an anti spam measure. I was logged into an account that was registered to a Gmail address and I had the following setting enabled.

  • Sender info in from header on contact emails
If enabled, emails sent via the "Contact us" form will be sent with the sender's info in the "From" header rather than the "Reply-To" header. Enabling this may help with situations where replying to a contact message does not go to the correct address, but it may not be compatible with all SMTP servers.
I knew my host had no 'restrictions' but I hadn't considered something like SPAM filters. The warning was there for me all along in plain text.

Edit: Even though the emails are now getting through, I'm continuing to receive the error.
 
Last edited:
Top Bottom