I want to get EE's Outgoing Email working with the SMTP Protocol so that I can tag my messages using an SPF record, to avoid being marked as spam on delivery: https://support.google.com/a/answer/33786
I've tried settings in System Settings : General Settings : Outgoing Email for two entirely different SMTP servers without success.
This was tested using the Communicate panel in Developer : Utilities.
I'm having to conclude that EE is somehow not passing on correct credentials for sending messages. There's nothing conflicting in config.php or index.php
Any other tests I can try?
Gmail (G Suite) SMTP Relay
I worked with G Suite Support as far as we could go before they referred me back to EE. A 500 POST error appeared in the server log for a failed test. Gmail error page was:
Failed to authenticate password. Error: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials u35sm1903136uah.1 - gsmtp Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
Relevant EE settings in /cp/settings/email:
- Address: [G Suite Gmail address]
- Character encoding: UTF-8
- Protocol: SMTP
- Newline character: \r\n
- Server address: smtp-relay.gmail.com
- Server port: 587
- Username: [G Suite Gmail address]
- Password: [application-specific password]
- Connection type: STARTTLS
Gmail SMTP relay service settings:
- Allowed senders: Only addresses in my domains
- Only accept mail from the specified IP addresses: Yes
- Allowed IP addresses: [IP of sending server]
- Require SMTP Authentication: Yes (also tried No)
- Require TLS encryption: Yes
Gmail Allow per-user outbound gateways: On
VPS hosting provider's SMTP
Also used user/password authentication and STARTTLS. Error was 403 Forbidden page. This triggered the server to block me as a spammer... Once unblocked, same error.