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?