Connection could not be established with host

Your software
My Mautic version is: 4.4.6
My PHP version is: PHP Version 7.4.3-4ubuntu2.18
My Database type and version is: 8.0.32-0ubuntu0.20.04.2

Your problem
My problem is: The emails are not going out! Mautic was working just fine and suddenly This error appeared.

These errors are showing in the log:

[2023-03-15 00:25:05] mautic.ERROR: [MAIL ERROR] Failed to authenticate on SMTP server with username “peterm@surveyanalysis.us” using 1 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code “535”, with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " Log data: ++ Starting Swift_Transport_EsmtpTransport << 220 mail.surveyanalysis.us ESMTP Postfix >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> STARTTLS << 220 2.0.0 Ready to start TLS >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-AUTH PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> cGV0ZXJtQHN1cnZleWFuYWx5c2lzLnVz << 334 UGFzc3dvcmQ6 >> WjVESk5zYzA0S2RW << 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 !! Expected response code 235 but got code “535”, with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " (code: 535) Log data: ++ Starting Swift_Transport_EsmtpTransport << 220 mail.surveyanalysis.us ESMTP Postfix >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> STARTTLS << 220 2.0.0 Ready to start TLS >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-AUTH PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> cGV0ZXJtQHN1cnZleWFuYWx5c2lzLnVz << 334 UGFzc3dvcmQ6 >> WjVESk5zYzA0S2RW << 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 !! Expected response code 235 but got code “535”, with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " (code: 535) !! Expected response code 235 but got code “535”, with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " Log data: ++ Starting Swift_Transport_EsmtpTransport << 220 mail.surveyanalysis.us ESMTP Postfix >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> STARTTLS << 220 2.0.0 Ready to start TLS >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-AUTH PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> cGV0ZXJtQHN1cnZleWFuYWx5c2lzLnVz << 334 UGFzc3dvcmQ6 >> WjVESk5zYzA0S2RW << 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 !! Expected response code 235 but got code “535”, with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " (code: 535) (code: 535). Log data: ++ Starting Swift_Transport_EsmtpTransport << 220 mail.surveyanalysis.us ESMTP Postfix >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> STARTTLS << 220 2.0.0 Ready to start TLS >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-AUTH PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> cGV0ZXJtQHN1cnZleWFuYWx5c2lzLnVz << 334 UGFzc3dvcmQ6 >> WjVESk5zYzA0S2RW << 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 !! Expected response code 235 but got code “535”, with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " (code: 535) !! Expected response code 235 but got code “535”, with message “535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " Log data: ++ Starting Swift_Transport_EsmtpTransport << 220 mail.surveyanalysis.us ESMTP Postfix >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> STARTTLS << 220 2.0.0 Ready to start TLS >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-AUTH PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> cGV0ZXJtQHN1cnZleWFuYWx5c2lzLnVz << 334 UGFzc3dvcmQ6 >> WjVESk5zYzA0S2RW << 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 !! Expected response code 235 but got code “535”, with message “535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " (code: 535) (code: 535) >> RSET << 250 2.0.0 Ok (send); rich@eskalera.com {“exception”:”[object] (Swift_TransportException(code: 0): Failed to authenticate on SMTP server with username "peterm@surveyanalysis.us" using 1 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n"\nLog data:\n++ Starting Swift_Transport_EsmtpTransport\n<< 220 mail.surveyanalysis.us ESMTP Postfix\r\n\n>> EHLO surveywxmautic.surveywx.xyz\r\n\n<< 250-mail.surveyanalysis.us\r\n250-PIPELINING\r\n250-SIZE 15728640\r\n250-ETRN\r\n250-STARTTLS\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250-DSN\r\n250-SMTPUTF8\r\n250 CHUNKING\r\n\n>> STARTTLS\r\n\n<< 220 2.0.0 Ready to start TLS\r\n\n>> EHLO surveywxmautic.surveywx.xyz\r\n\n<< 250-mail.surveyanalysis.us\r\n250-PIPELINING\r\n250-SIZE 15728640\r\n250-ETRN\r\n250-AUTH PLAIN LOGIN\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250-DSN\r\n250-SMTPUTF8\r\n250 CHUNKING\r\n\n>> AUTH LOGIN\r\n\n<< 334 VXNlcm5hbWU6\r\n\n>> cGV0ZXJtQHN1cnZleWFuYWx5c2lzLnVz\r\n\n<< 334 UGFzc3dvcmQ6\r\n\n>> WjVESk5zYzA0S2RW\r\n\n<< 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n\n!! Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n" (code: 535)\nLog data:\n++ Starting Swift_Transport_EsmtpTransport\n<< 220 mail.surveyanalysis.us ESMTP Postfix\r\n\n>> EHLO surveywxmautic.surveywx.xyz\r\n\n<< 250-mail.surveyanalysis.us\r\n250-PIPELINING\r\n250-SIZE 15728640\r\n250-ETRN\r\n250-STARTTLS\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250-DSN\r\n250-SMTPUTF8\r\n250 CHUNKING\r\n\n>> STARTTLS\r\n\n<< 220 2.0.0 Ready to start TLS\r\n\n>> EHLO surveywxmautic.surveywx.xyz\r\n\n<< 250-mail.surveyanalysis.us\r\n250-PIPELINING\r\n250-SIZE 15728640\r\n250-ETRN\r\n250-AUTH PLAIN LOGIN\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250-DSN\r\n250-SMTPUTF8\r\n250 CHUNKING\r\n\n>> AUTH LOGIN\r\n\n<< 334 VXNlcm5hbWU6\r\n\n>> cGV0ZXJtQHN1cnZleWFuYWx5c2lzLnVz\r\n\n<< 334 UGFzc3dvcmQ6\r\n\n>> WjVESk5zYzA0S2RW\r\n\n<< 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n\n!! Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n" (code: 535)\n!! Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n"\nLog data:\n++ Starting Swift_Transport_EsmtpTransport\n<< 220 mail.surveyanalysis.us ESMTP Postfix\r\n\n>> EHLO surveywxmautic.surveywx.xyz\r\n\n<< 250-mail.surveyanalysis.us\r\n250-PIPELINING\r\n250-SIZE 15728640\r\n250-ETRN\r\n250-STARTTLS\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250-DSN\r\n250-SMTPUTF8\r\n250 CHUNKING\r\n\n>> STARTTLS\r\n\n<< 220 2.0.0 Ready to start TLS\r\n\n>> EHLO surveywxmautic.surveywx.xyz\r\n\n<< 250-mail.surveyanalysis.us\r\n250-PIPELINING\r\n250-SIZE 15728640\r\n250-ETRN\r\n250-AUTH PLAIN LOGIN\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250-DSN\r\n250-SMTPUTF8\r\n250 CHUNKING\r\n\n>> AUTH LOGIN\r\n\n<< 334 VXNlcm5hbWU6\r\n\n>> cGV0ZXJtQHN1cnZleWFuYWx5c2lzLnVz\r\n\n<< 334 UGFzc3dvcmQ6\r\n\n>> WjVESk5zYzA0S2RW\r\n\n<< 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n\n!! Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n" (code: 535) (code: 535). at /var/www/surveywxmautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php:191)”} {“hostname”:“139-144-58-106.ip.linodeusercontent.com”,“pid”:3373837}

[2023-03-15 00:25:55] mautic.ERROR: [MAIL ERROR] Failed to authenticate on SMTP server with username “peterm@surveyanalysis.us” using 1 possible authenticators. Authenticator LOGIN returned Connection to tcp://mail.surveyanalysis.us:587 Timed Out Log data: ++ Starting Swift_Transport_EsmtpTransport << 220 mail.surveyanalysis.us ESMTP Postfix >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> STARTTLS << 220 2.0.0 Ready to start TLS >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-AUTH PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> cGV0ZXJtQHN1cnZleWFuYWx5c2lzLnVz << 334 UGFzc3dvcmQ6 >> WjVESk5zYzA0S2RW << 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 !! Expected response code 235 but got code “535”, with message “535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " (code: 535) !! Expected response code 235 but got code “535”, with message “535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " Log data: ++ Starting Swift_Transport_EsmtpTransport << 220 mail.surveyanalysis.us ESMTP Postfix >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> STARTTLS << 220 2.0.0 Ready to start TLS >> EHLO surveywxmautic.surveywx.xyz << 250-mail.surveyanalysis.us 250-PIPELINING 250-SIZE 15728640 250-ETRN 250-AUTH PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-DSN 250-SMTPUTF8 250 CHUNKING >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> cGV0ZXJtQHN1cnZleWFuYWx5c2lzLnVz << 334 UGFzc3dvcmQ6 >> WjVESk5zYzA0S2RW << 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 !! Expected response code 235 but got code “535”, with message “535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6 " (code: 535) (code: 535) >> RSET !! Connection to tcp://mail.surveyanalysis.us:587 Timed Out (code: 0). (send); jamie@harri.com {“exception”:”[object] (Swift_TransportException(code: 0): Failed to authenticate on SMTP server with username "peterm@surveyanalysis.us" using 1 possible authenticators. Authenticator LOGIN returned Connection to tcp://mail.surveyanalysis.us:587 Timed Out\nLog data:\n++ Starting Swift_Transport_EsmtpTransport\n<< 220 mail.surveyanalysis.us ESMTP Postfix\r\n\n>> EHLO surveywxmautic.surveywx.xyz\r\n\n<< 250-mail.surveyanalysis.us\r\n250-PIPELINING\r\n250-SIZE 15728640\r\n250-ETRN\r\n250-STARTTLS\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250-DSN\r\n250-SMTPUTF8\r\n250 CHUNKING\r\n\n>> STARTTLS\r\n\n<< 220 2.0.0 Ready to start TLS\r\n\n>> EHLO surveywxmautic.surveywx.xyz\r\n\n<< 250-mail.surveyanalysis.us\r\n250-PIPELINING\r\n250-SIZE 15728640\r\n250-ETRN\r\n250-AUTH PLAIN LOGIN\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250-DSN\r\n250-SMTPUTF8\r\n250 CHUNKING\r\n\n>> AUTH LOGIN\r\n\n<< 334 VXNlcm5hbWU6\r\n\n>> cGV0ZXJtQHN1cnZleWFuYWx5c2lzLnVz\r\n\n<< 334 UGFzc3dvcmQ6\r\n\n>> WjVESk5zYzA0S2RW\r\n\n<< 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n\n!! Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n" (code: 535)\n!! Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n"\nLog data:\n++ Starting Swift_Transport_EsmtpTransport\n<< 220 mail.surveyanalysis.us ESMTP Postfix\r\n\n>> EHLO surveywxmautic.surveywx.xyz\r\n\n<< 250-mail.surveyanalysis.us\r\n250-PIPELINING\r\n250-SIZE 15728640\r\n250-ETRN\r\n250-STARTTLS\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250-DSN\r\n250-SMTPUTF8\r\n250 CHUNKING\r\n\n>> STARTTLS\r\n\n<< 220 2.0.0 Ready to start TLS\r\n\n>> EHLO surveywxmautic.surveywx.xyz\r\n\n<< 250-mail.surveyanalysis.us\r\n250-PIPELINING\r\n250-SIZE 15728640\r\n250-ETRN\r\n250-AUTH PLAIN LOGIN\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250-DSN\r\n250-SMTPUTF8\r\n250 CHUNKING\r\n\n>> AUTH LOGIN\r\n\n<< 334 VXNlcm5hbWU6\r\n\n>> cGV0ZXJtQHN1cnZleWFuYWx5c2lzLnVz\r\n\n<< 334 UGFzc3dvcmQ6\r\n\n>> WjVESk5zYzA0S2RW\r\n\n<< 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n\n!! Expected response code 235 but got code "535", with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n" (code: 535) (code: 535)\n>> RSET\r\n\n!! Connection to tcp://mail.surveyanalysis.us:587 Timed Out (code: 0). at /var/www/surveywxmautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php:191)”} {“hostname”:“139-144-58-106.ip.linodeusercontent.com”,“pid”:3373837}
[2023-03-15 00:25:55] mautic.ERROR: [MAIL ERROR] Connection could not be established with host mail.surveyanalysis.us :stream_socket_client(): unable to connect to tcp://mail.surveyanalysis.us:587 (Connection refused) Log data: ++ Starting Swift_Transport_EsmtpTransport !! Connection could not be established with host mail.surveyanalysis.us :stream_socket_client(): unable to connect to tcp://mail.surveyanalysis.us:587 (Connection refused) (code: 0) (send); parag.kulkarni@simpplr.com {“exception”:”[object] (Swift_TransportException(code: 0): Connection could not be established with host mail.surveyanalysis.us :stream_socket_client(): unable to connect to tcp://mail.surveyanalysis.us:587 (Connection refused)\nLog data:\n++ Starting Swift_Transport_EsmtpTransport\n!! Connection could not be established with host mail.surveyanalysis.us :stream_socket_client(): unable to connect to tcp://mail.surveyanalysis.us:587 (Connection refused) (code: 0) at /var/www/surveywxmautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:124)"} {“hostname”:“139-144-58-106.ip.linodeusercontent.com”,“pid”:3373837}

Steps I have tried to fix the problem: We checked our server and everything seems to be working correctly…