hairydog Posted July 7, 2020 Share Posted July 7, 2020 When I tried to set up email sending in the Admn, using the phpmail setting works, but smtp ssl or tls both fail with an error message that says the authentication failed, even though I just pasted the password and username into the server as well as the field in the Admin. The same details definitely work in the webmail, so something odd is happening in phpmailer 6.0.7 Link to comment Share on other sites More sharing options...
havenswift-hosting Posted July 7, 2020 Share Posted July 7, 2020 Username and password are not the only things used for authentication for SMTP - you need the correct server name and correct port. SMTP is far superior to phpMail in terms of security, deliverability (many emails sent via phpMail will go into spam as they are unauthenticated) and traceability so it is a good idea to swap over. That along with the fact that phpMail will be phased out in the near future and some hosting companies already disable it's use on server security grounds Ian Link to comment Share on other sites More sharing options...
hairydog Posted July 7, 2020 Author Share Posted July 7, 2020 Yes, but the server and port settings are correct. It successfully connects to the correct host through the specified port. The pop-up window shows that. What fails is the user authentication. The user details are correct. I set them using paste and paste, so as to rule out any possible typos. Link to comment Share on other sites More sharing options...
havenswift-hosting Posted July 7, 2020 Share Posted July 7, 2020 OK - dont suppose you have any "special" characters in your password ? If so you will need to change the password to remove them and have numbers, uppercase or lowercase letters only - bug that has been around and reported for a long time ! Link to comment Share on other sites More sharing options...
hairydog Posted July 7, 2020 Author Share Posted July 7, 2020 Nope, just letters (UC and LC) and numbers Link to comment Share on other sites More sharing options...
havenswift-hosting Posted July 7, 2020 Share Posted July 7, 2020 That is the only known problem and we use SMTP across many hundreds of CubeCart websites with no issues at all Ian Link to comment Share on other sites More sharing options...
hairydog Posted July 7, 2020 Author Share Posted July 7, 2020 2020-07-07 16:05:57 SERVER -> CLIENT: 220 [server].co.uk ESMTP Exim Tue, 07 Jul 2020 17:05:57 +0100 2020-07-07 16:05:57 CLIENT -> SERVER: EHLO www.[domain].uk 2020-07-07 16:05:57 SERVER -> CLIENT: 250-[server].co.uk Hello www.[domain].uk [212.110.172.147]250-SIZE 52428800250-8BITMIME250-PIPELINING250-CHUNKING250-STARTTLS250 HELP 2020-07-07 16:05:57 CLIENT -> SERVER: STARTTLS 2020-07-07 16:05:57 SERVER -> CLIENT: 220 TLS go ahead 2020-07-07 16:05:57 CLIENT -> SERVER: EHLO www.[domain].uk 2020-07-07 16:05:57 SERVER -> CLIENT: 250-[server].co.uk Hello www.[domain].uk [212.110.172.147]250-SIZE 52428800250-8BITMIME250-PIPELINING250-AUTH PLAIN LOGIN250-CHUNKING250 HELP 2020-07-07 16:05:57 CLIENT -> SERVER: AUTH LOGIN 2020-07-07 16:05:57 SERVER -> CLIENT: 334 VXNlcm5hbWU6 2020-07-07 16:05:57 CLIENT -> SERVER: <credentials hidden> 2020-07-07 16:05:57 SERVER -> CLIENT: 334 UGFzc3dvcmQ6 2020-07-07 16:05:57 CLIENT -> SERVER: <credentials hidden> 2020-07-07 16:05:59 SERVER -> CLIENT: 535 Incorrect authentication data 2020-07-07 16:05:59 SMTP ERROR: Password command failed: 535 Incorrect authentication data SMTP Error: Could not authenticate. 2020-07-07 16:05:59 CLIENT -> SERVER: QUIT 2020-07-07 16:05:59 SERVER -> CLIENT: 221 [server].co.uk closing connection SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Is there a way to see the <credentials hidden> that this popup hides? Link to comment Share on other sites More sharing options...
bsmither Posted July 7, 2020 Share Posted July 7, 2020 Well, probably, and I will get to that in a minute or two. Please know that, in our experience, using a mouse swipe (and sometimes even the keyboard) to highlight and then copy/paste text from one location to another will invariably also catch leading or trailing invisible (whitespace) characters, such as a tab character. Please try manually typing in the username and password into the form and retesting. Link to comment Share on other sites More sharing options...
bsmither Posted July 7, 2020 Share Posted July 7, 2020 In classes/ajax.class.php, near line 286: Find: $test_mailer->SMTPDebug = 2; Change to: $test_mailer->SMTPDebug = 4; A PHPMailer debug level of 4 (DEBUG_LOWLEVEL) will not conceal the credentials of the debug output. Also, this debug level generates much more output. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.