
I have never actually managed to make good use of the email module - but i have wrestled with smtp errors a few times and managed to get email notifications working. All good - until it stops working again, presumably its the upgrades?
At the most basic levelā¦
My situation now is that If i go to
Admin>Email Settings>Outgoing Mail Configuration and then set the password before clicking āSend Test Emailā, it works.
But if i click āSend Test Emailā a second time it fails with the error āSMTP Error: Could not authenticateā
Attempting to set the password and saving the Email settings also results in the same error.
Basically the āsend Test Emailā only works immediately after setting the password.
i am slowly losing hope 
Maybe this can help you: https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/18311-where-is-smtp-credentials-stored
Iāve experienced the same problem and I ended up having a static SMTP credential for the outbound email as it would always fail to authenticate otherwise.
Hi,
By setting āstatic SMTP credentialā do you mean setting
$this->Password = 'password';
in the SugarPHPMailer.php file?
That seems to have worked
@Bungle, on which SuiteCRM version are you?
Version 7.10.4
Sugar Version 6.5.25 (Build 344)
Can you please try to check if, despite that error, the account gets properly set up, and works well?
I am just trying to get a better idea of where the bug is.
Unfortunately it only works if i set the password in SugarPHPMailer.
The test email in Admin>Email Settings is only sent immediately after setting the password box. The second time i click āsend test emailā it fails, even though i have not saved the page.
However, in āAdmin>Outgoing Emailā the test email works indefinitely - until the settings are saved.
ahh!
Setting the password in āAdmin>Outbound Emailā updates the āmail_smtppassā for the āsystemā type account in the āoutbound_emailā table; to the correct value - and my workflows send email. All good.
However, setting the password in āAdmin>Email Settingsā updates the same field in the table, but with an incorrect value - email stops working.
This may explain why my email stopped working - it wasnāt the upgrade, email password changed and i most likely tried to update the password in Admin>Email Settings.
The error must be in the code that writes the password in the āAdmin>Email Settingsā page?
Hello. Iāve been trying to reproduce your Issues in my test installation of 7.10.4, but I canāt.
I tried the one about sending the test email twice, but it works well both times.
I tried changing the password from the Admin / Email settings screen, but it changes the password correctly for meā¦
?
Very strange, i havenāt customised any code - perhaps my instance hasnāt upgraded properly at some point?
For the moment i have a workaround, though not sure how secure it is to have the password in SugarPHPMailer?
You and me both on this one.
Setting the password as static should be relatively safe as long as no one has access to your codes. And who would look into a SugarPHPMailer file?
This just occurred recently for us.
Both of you, please donāt give up on getting to a reproducible version of this bug. We need to be 100% relentless with Email bugs, squash all of them one by one until we drive up the quality in this module. This is much needed and my main concern at the moment.
i donāt want to give up, i just donāt have the skill set to find the root of the problem. But i am more than happy to help if i can.
The help file mentions 4 types of email accounts, and one of those is outgoing email accounts. It then goes on to say that you set the default email settings in Admin>Email Settings.
However there is also a system type email account listed in Admin>Outgoing Email.
This is duplicating the way you can set the default settings and is confusing, and its also making it harder to locate the problem.
Getting rid of the Admin>Email Settings page would be the best option - leaving just one page (outgoing Email) where you setup a āsystemā type account for default settings.
Now i need to find out why the personal email has stopped working too, its just saying loading in the mail settings page - then crashes the system with a proxy error? The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /crm/index.php.

On the plus side, weāve narrowed it down to the authentication problem. Iāve also noticed that multiple credentials are stored on the āoutbound_emailā. The problem might lie on the queries that fetch the credentials to be used for the SMTP.
Thanks to both of you.
@iamreb, what do you mean about the outbound_emails table? Do you get more than one row for a single account? If you can paste (obfuscated) contents of your table, I would appreciate it.
After todayās upgrade to 7.10.5 the Admin>Email Setting page does not save the record at all; no error message in log file (previously i had incorrect password being saved)
As a result i now now have an error message which is appearing on every single view, which on a mobile device takes up a LOT of screen space.
: āNote: To send record assignment notifications, an SMTP server must be configured in Email Settings.ā.
On the plus side, the emails are still being sent; which i assume is because the outbound_email table is no longer being update with the incorrect password.
This post solved the problem for me https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/19163-email-sending-settings#66312 .
After resetting the static password in sugarPHPMailer iām back to where i was before the upgrade
Hello,
Yes upon checking there are duplicates in the āoutbound_emailā per āuser_idā
Did you pay attention to the ādeletedā column? If ādeleted=1ā they wonāt be used.