Can't send e-mails (Suite 7.10.4)

Hi,

Iā€™m just starting my journey with SuiteCRM and I like it a lot.

Iā€™ve encountered one problem, though - I canā€™t send e-mails from user accounts.

Iā€™ve correctly definied all the SMTP settings (when I run a test within the config, the message gets through), but when I go to Emails module and try to send a message from there, I get an error ā€œError Sending Email. Please contact your administrator for assistance.ā€ and in most of the cases I also get logged out (ā€œYou have been logged out because your session has expired.ā€). I also tried enabling system SMTP account for user and changing their SMTP server to this one, with no availā€¦

When I look at the logs, I see the following entry, no matter if I try using system or user-defined SMTP account:
Tue Apr 10 20:55:34 2018 [5654][41252422-bd01-74c2-80ea-5acce2014d05][SECURITY] User XXXi attempted to send an email using incorrect email account settings in which they do not have access to.

Iā€™ve had the same problem when running SuiteCRM 7.10.2.

Iā€™m using Gsuite SMTP with TLS on port 587.

Please help!

Best,
F.

Does anything change if you configure a different account? I mean, a different email address with a different server? Please try that and tell me how it went.

I tried setting up accounts for a few users, so I did try different e-mail accounts, but they were all Gsuite, though. I know that ā€˜less secure appsā€™ setting must be enabled - it is on all of the accounts.

Also Iā€™d like to mention that these accounts did have strong passwords (20 characters long with special characters), but thinking that might be the cause, I changed them, but it didnā€™t solve the problem.

Iā€™ll try using a different SMTP server, but in the end Iā€™d like to stay with Google.

You can uncomment these lines to get more SMTP debug info:

https://github.com/salesagility/SuiteCRM/blob/v7.10.4/include/SugarPHPMailer.php#L446

https://github.com/salesagility/SuiteCRM/blob/v7.10.4/include/SugarPHPMailer.php#L486-L493

This will be helpful to see why the GSuite server is complaining.

I uncommented these lines, but I do not see any more info than before in the log. I event changed the log level to ā€œDebugā€, but I donā€™t see anything more related to SMTP.

Am I doing something wrong?

Hi,
Can you please set the CRM permissions? There can be permission issues.
Also please add ā€œOutgoing SMTP Mail Serversā€ from ā€œSETTINGSā€ tab in email module.

Thanks

@FKajzderski instead of changing the log level to debug, what I do when I want to concentrate on some issue is I raise the messages to FATAL. So I would do that change in the lines I told you to uncomment and keep the log clear of all the tons of debug messages.

Now, I donā€™t really know why those messages are not showing in your logs. I think that code runs every time you send an email, but there might be other code paths I am not aware of. How exactly are you trying to send the email?