# I was getting an error while trying to connect mautic with mail250 SMTP server

**URL:** <https://forum.mautic.org/t/i-was-getting-an-error-while-trying-to-connect-mautic-with-mail250-smtp-server/18064>\
**Category:** Product Support\
**Tags:** mautic-3\
**Created:** [February 6, 2021, 6:26pm UTC](https://forum.mautic.org/t/i-was-getting-an-error-while-trying-to-connect-mautic-with-mail250-smtp-server/18064 "2021-02-06T18:26:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![punctual](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/punctual/32/1445_2.png) [@punctual](https://forum.mautic.org/u/punctual)\
**Post date:** [February 6, 2021, 6:26pm UTC](https://forum.mautic.org/t/i-was-getting-an-error-while-trying-to-connect-mautic-with-mail250-smtp-server/18064/1 "2021-02-06T18:26:03Z")

</div>

**Your software**  
My Mautic version is:3.2.5  
My PHP version is:7.3.26  
My Database type and version is: i don.t really know

**Your problem**  
My problem is:

I am a still a newbie with using mautic, i have successfully installed mautic on a web hosting server, set up the cron jobs and everything else.  
I tried to connect the SMTP server (mail250) but i was getting this error below.

Unable to connect with TLS encryption Log data: ++ Starting Swift\_SmtpTransport \<\< 220 incoming-smtp.local ESMTP Welcome to SMTP service D40 \>\> EHLO [mautic.mydomain.com](http://mautic.mydomain.com) \<\< 250-incoming-smtp.local at your service, [139.59.60.225] 250-8BITMIME 250-ENHANCEDSTATUSCODES 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250 STARTTLS \>\> STARTTLS \<\< 220 2.0.0 Ready to start TLS !! Unable to connect with TLS encryption (code: 0)  
++ Starting Swift\_SmtpTransport \<\< 220 incoming-smtp.local ESMTP Welcome to SMTP service D40 \>\> EHLO [mautic.mydomain.com](http://mautic.mydomain.com) \<\< 250-incoming-smtp.local at your service, [139.59.60.225] 250-8BITMIME 250-ENHANCEDSTATUSCODES 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250 STARTTLS \>\> STARTTLS \<\< 220 2.0.0 Ready to start TLS !! Unable to connect with TLS encryption (code: 0)

These errors are showing in the log:  
[2021-02-06 18:16:41] mautic.WARNING: PHP Warning - stream\_socket\_enable\_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls\_process\_server\_certificate:certificate verify failed - in file /home/domain/mautic.mydomain.com/mailer/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php - at line 94

Steps I have tried to fix the problem:  
I have been trying to change the port, SMTP encryption mode and all but still can;t figure it out,
