Email Setup Fail to connect to SMTP for Self hosted or Gmail

Hi,

I do not know if this is a problem with Invoice Ninja, OS or DirectAdmin. So hope someone can help.

I have a clean install of DirectAdmin Setup on Centos 8. I have connected the domain, created Subdomain. That all works fine uploaded the V5 Files connected to Database.

Created email account (accounts@domain.com) and Tested Confirm I can added this to my phone and send and receive email. so the mail.domain.com is working.

However when I try adding a locally created email account (On same Server) and also trying a gmail account that has worked before. It fails to connect to host. I am happy to give any think that is needed. But just don’t have a clue and what system is causing.

Hi,

Hard to say, it sounds like it could be a configuration or networking issue.

Hi hillel.

Thanks for the reply i did think that :slight_smile: , its causing problems as I don’t what system is causing the block so have no clue who to contact. Does Invoice Ninja have any further logs in the background I could look at or maybe post?

It’s detailed here:

https://invoiceninja.github.io/docs/self-host-troubleshooting/

Hi Hillel,

So have taken a look at the log file nothing get put in there that point to the email setup

[2021-04-09 19:27:41] production.INFO: db fails
[2021-04-09 19:27:46] production.INFO: db fails
[2021-04-09 19:27:46] production.INFO: db fails

If I configure the setting for SSL/TLS and 587 Port i get

Connection could not be established with host mail.cd-medserve.uk :stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number

If I do STARTTLS I get random stuff looks like font formats and I cant make anythink out.

SQLSTATE[HY000] [1045] Access denied for user ‘ninja’@‘localhost’ (using password: YES) (SQL: insert into jobs (queue, attempts, reserved_at, available_at, created_at, payload) values (default, 0, ?, 1617997275, 1617997275, {“uuid”:“d1fe95ea-9133-4999-93a2-961f962969d6”,“displayName”:“App\Listeners\Mail\MailSentListener”,“job”:“Illuminate\Queue\CallQueuedHandler@call”,“maxTries”:null,“maxExceptions”:null,“backoff”:null,“timeout”:null,“retryUntil”:null,“data”:{“commandName”:“Illuminate\Events\CallQueuedListener”,“command”:“O:36:“Illuminate\Events\CallQueuedListener”:18:{s:5:“class”;s:35:“App\Listeners\Mail\MailSentListener”;s:6:“method”;s:6:“handle”;s:4:“data”;a:1:{i:0;O:34:“Illuminate\Mail\Events\MessageSent”:3:{s:7:“message”;O:13:“Swift_Message”:23:{s:28:”\u0000Swift_Message\u0000headerSigners";a:0:{}s:26:"\u0000Swift_Message\u0000bodySigners";a:0:{}s:27:"\u0000Swift_Message\u0000savedMessage";a:0:{}s:13:"\u0000*\u0000userFormat";N;s:14:"\u0000*\u0000userCharset";s:5:“utf-8”;s:12:"\u0000*\u0000userDelSp";N;s:33:"\u0000Swift_Mime_MimePart\u0000nestingLevel";i:4096;s:36:"\u0000Swift_Mime_SimpleMimeEntity\u0000headers";O:26:“Swift_Mime_SimpleHeaderSet”:5:{s:35:"\u0000Swift_Mime_SimpleHeaderSet\u0000factory";O:30:“Swift_Mime_SimpleHeaderFactory”:5:{s:39:"\u0000Swift_Mime_SimpleHeaderFactory\u0000encoder";O:40:“Swift_Mime_HeaderEncoder_QpHeaderEncoder”:2:{s:13:"\u0000*\u0000charStream";O:39:“Swift_CharacterStream_NgCharacterStream”:9:{s:51:"\u0000Swift_CharacterStream_NgCharacterStream\u0000charReader";N;s:58:"\u0000Swift_CharacterStream_NgCharacterStream\u0000charReaderFactory";O:57:“Swift_CharacterReaderFactory_SimpleCharacterReaderFactory”:0:{}s:48:"\u0000Swift_CharacterStream_NgCharacterStream\u0000charset";s:5:“utf-8”;s:46:"\u0000Swift_CharacterStream_NgCharacterStream\u0000datas";s:0:"";s:50:"\u0000Swift_CharacterStream_NgCharacterStream\u0000datasSize";i:0;s:44:"\u0000Swift_CharacterStream_NgCharacterStream\u0000map";N;s:48:"\u0000Swift_CharacterStream_NgCharacterStream\u0000mapType";i:0;s:50:"\u0000Swift_CharacterStream_NgCharacterStream\u0000charCount";i:0;s:51:"\u0000Swift_CharacterStream_NgCharacterStream\u0000currentPos";i:0;}s:9:"\u0000*\u0000filter";N;}s:44:"\u0000Swift_Mime_SimpleHeaderFactory\u0000paramEncoder";O:28:“Swift_Encoder_Rfc2231Encoder”:1:{s:40:"\u0000Swift_Encoder_Rfc2231Encoder\u0000charStream";O:39:“Swift_CharacterStream_NgCharacterStream”:9:{s:51:"\u0000Swift_CharacterStream_NgCharacterStream\u0000charReader";N;s:58:"\u0000Swift_CharacterStream_NgCharacterStream\u0000charReaderFactory";r:19;s:48:"\u0000Swift_CharacterStream_NgCharacterStream\u0000charset";s:5:“utf-8”;s:46:"\u0000Swift_CharacterStream_NgCharacterStream\u0000datas";s:0:"";s:50:"\u0000Swift_CharacterStream_NgCharacterStream\u0000datasSize";i:0;s:44:"\u0000Swift_CharacterStream_NgCharacterStream\u0000map";N;s:48:"\u0000Swift_CharacterStream_NgCharacterStream\u0000mapType";i:0;s:50:"\u0000Swift_CharacterStream_NgCharacterStream\u0000charCount";i:0;s:51:"\u0000Swift_CharacterStream_NgCharacterStream\u0000currentPos";i:0;}}s:46:"\u0000Swift_Mime_SimpleHeaderFactory\u0000emailValidator";O:37:“Egulias\EmailValidator\EmailValidator”:3:{s:44:"\u0000Egulias\EmailValidator\EmailValidator\u0000lexer";O:33:“Egulias\EmailValidator\EmailLexer”:10:{s:12:"\u0000*\u0000charValue";a:28:{s:1:"(";i:49;s:1:")";i:261;s:1:"

I am just testing with Gmail to see if its different.

Are you using a proxy?

Maybe the info here will help: