PHP Mailer - Error:SMTP connect() failed.

Hi,

Outgoing emails used to work, with one single outgoing SMTP account having been configured for all the users for many months. That does not work anymore (a consequence of an upgrade ? not sure about it) and any attempt at sending a test mail fails too with a PHP error.

Error:SMTP connect() failed.

Of course nothing changed with the SMTP account itself (same user, same password).

The following error messages are visible in suitecrm.log :

Wed Nov  2 12:35:54 2016 [1321][1][FATAL] SugarPHPMailer encountered an error: An outgoing mail server is not configured to send emails. Please configure an outgoing mail server or select an outgoing mail server for the mail account that you are using in Settings >> Mail Account.
Wed Nov  2 12:35:54 2016 [1321][1][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Wed Nov  2 12:38:13 2016 [1700][1][FATAL]  Query Failed:  SELECT  outbound_email.id , outbound_email.name , outbound_email.assigned_user_id  FROM outbound_email  where outbound_email.deleted=0 ORDER BY outbound_email.date_entered DESC LIMIT 0,21: MySQL error 1054: Unknown column 'outbound_email.assigned_user_id' in 'field list'

I failed to find a topic related to the same problem on the forum. Any guidance would be appreciated.

Hello,

The account data to smtp sometimes get lost during an upgrade, even though these have always previously worked. Try to enter the data again and save it in the admin area. This should fix the problem.

Hi Wieland and thank you for the reply.

Eventually, PHPMailer started working when configured with another SMTP server, with SMTP authentication ant SSL on port 465. I have no idea what is actually wrong with the SMTP server which was first in use, as there is no one setup which works with it anymore (it used to work without SSL/TLS before). Both SMTP servers work fine from other applications and computers.

I first suspected that the chosen password (which contained random characters) might have been the cause of the problem, part of it being interpreted as an escape character by a possibly faulty code gathered with a recent update. Wrong turn : setting a simple and short password did not fix the case.

I suspected then that the trouble might have come from the “Opportunistic TLS” feature of PHPMail, as the first server which we used was known to have a discrepancy between its X.509 wildcard certificate and its sub-domaine. This is why we used to connect to it without SSL/TLS from SuiteCRM. Interesting enough, the PHPMailer troubleshooting page states that PHPMailer “silently enables encryption automatically, even if you have not set SMTPSecure”. However the problem where not there ! Having corrected the discrepancy between certificate and domain, PHPMailer did not give better result.

The only workaround at the present time is to use another external SMTP server.

According to you, does PHPMailer logs the SMTP transactions somewhere ? I would be curious to understand why it works with a given SMTP server and not with another one, all setups being the same.

Regards.

I have a similar problem when I was trying to send a test email from the Email configuration page and it kept failing with a PHPMailer error. As this is a crucial function of SuiteCRM for me, I’m at a loss at how things seem to work one day and quit working the next. I was using localhost for mail as mail is going through my shared hosted server. It no longer works and I have no idea how to get it working again. I’ve read through and tried different things but no luck.

FYI there’s lots of comments at https://github.com/salesagility/SuiteCRM/issues/1123

I found that thread and read through it before posting. I tried several different variations. My existing settings were localhost for mail server, no auth, SSL on 465. Mail used to work fine with those settings. What’s working now is changing the mail host to my domain name, adding auth user/passwd, no encryption and port 25. That is quite strange and not what I was expecting to work. Any ideas why this is?

Are you using a shared host?

Yes, shared web hosting. Nothing has changed recently from what I can tell. The only thing I can think of is that I got a SSL certificate installed recently. Mail was working fine till I noticed some workflows sending email were failing and tried sending a test message from the email settings in Admin.

Are you experiencing similar issue when using SMTP Port 25 without SSL/TLS?

No, but I just realized my password is not being saved with these settings! When I click on Change password I get a blank field. When I put in the password and send a test email it goes through. If I open the Email settings again and try sending a test email, it gives me the SMTP error till I change password and put it in again. I don’t know what is going on with this but it’s supremely annoying. I also found out that my old email templates can’t be edited and I can’t even put my HTML signature into new email templates. This is seriously broken.

Ok, so I had to disable auth and it’s working fine now. For some reason I can’t explain, sending emails without auth or SSL/TLS and using port 25 is the only method that’s working to send out emails. Now to figure out the broken email templates. If it’s not one thing it’s another. I thought SuiteCRM was pretty cool for a free CRM but I think I was wrong. The most basic functionality either seems to be broken or non-existent. Not very usable in it’s current form for a serious CRM. I’ve spent way too much time on it.

yes me too faced the same thing that suite crm is very anoying and its all time waste CRM

@dhaval903 ,

Sad you think SuiteCRM wasted your time. I can confirm that SuiteCRM has been a good tool an I have been able to configure email with the various mayor email providers (Gmail, Office365…).

BTW. Email configuration is not just on SuiteCRM side. Sometimes you need to allow connection on your Email provider side too. May I know who is yout email provider?

Thanks,

BrozTechnologies

1 Like

it may be good tool for you but my requirments not satisfied with this . trying for something till a week and still not getting any feasible solution its not good for any CRM . i’m working on configure with gmail i tried all the way , open security from google and all things but still not getting any connection after that i created new mail id which works very well . but besides emails there are so many problems and also inubilt facilities are very less and plugins which are costly too…it generates problems in some shared hosting environment , email can not be moved to another folder , lesser themes available , permissions problems and many more

It definitely is a good tool, As said above by a user, the email configuration could be a issue of the server. We would like to hear the inbuilt features you are looking for. The Core team and the contributors are doing best since years and thus we have a most powerful open source solution. I think you are having an implementation problem other then the product issues.

yes surely its good tool but as compared to other configurations for other things or other plugins are very much tough task . i’m using since 3 years but i never seen such problems in any crm . to install any language pack i have to do 50 types of configuration which is not feasible . so i’ll personally not recommend it to anyone .

I believe most of the plugins or language pack are Plug and Play, whether they are free or from SuiteCRM store.

The guides are easily available for

I respect you may not want to use it, But that doesn’t make the product flaw. We have seen many big business using it happily since years. Feel free to take a look at from a start with the right approach of getting it implemented and get the best out of it.