How To Fix "Smtp Error: Could Not Connect To Smtp Host

      52
We have sầu a new thietkewebhcm.com.vn 8 site & are having issues with the SMTPhường module. The trương mục we are using to lớn sover email works successfully on our thietkewebhcm.com.vn 7 sites và in other cases, but we cannot get it to work successfully on thietkewebhcm.com.vn 8. I have sầu also tried another Non-SSL tài khoản and am getting the same two messages over và over in the error log.

Bạn đang xem: How to fix "smtp error: could not connect to smtp host

Error sending e-mail from smtp
gmail.com with reply-lớn not set).

I have sầu found many similar questions, but not a working solution yet. Any help would be greatly appreciated, thank you in advance!


*

*

Doh! It turns out this was not a thietkewebhcm.com.vn issue, but a Centos issue with SELinux. I was able lớn kiểm tra SELinx settings by running the following commands

getsebool httpd_can_sendmail

which returned

httpd_can_sendmail --> off

and

getsebool httpd_can_network_connect

returned

httpd_can_network_connect --> off

I enabled them by running this

setsebool -P httpd_can_sendmail 1

setsebool -Phường httpd_can_network_connect 1

And the thietkewebhcm.com.vn SMTP module worked beautifully after that. Hopefully this helps someone else as well.


*

*

For thietkewebhcm.com.vn 8 Install PHPMailer và SMTP:Go to lớn the root of your thietkewebhcm.com.vn 8 project and exexinh đẹp below khổng lồ install & enable smtp module from Admin interface or via drush

composer require phpmailer/phpmailercomposer require thietkewebhcm.com.vn/smtpConfigure SMTPhường at: /admin/config/system/smtp

INSTALL OPTIONS

Set SMTP as the mặc định mailsystemOnWhen on, all mail is passed through the SMTPhường. module.SMTP SERVER SETTINGS

SMTP. server

smtp.host.nameThe address of your outgoing SMTP hệ thống.SMTPhường. backup server

The address of your outgoing SMTPhường backup server. If the primary server can"t be found this one will be tried. This is optional.

Xem thêm: Hướng Dẫn 4 Cách Hiện File Ẩn Trong Win 7, 8, 8, Hướng Dẫn Mở Thư Mục Ẩn Trong Windows 7

SMTP port

25The default SMTPhường port is 25, if that is being blocked try 80. Gmail uses 465. See http://tin nhắn.google.com/support/bin/answer.py?answer=13287 for more information on configuring for use with Gmail.Use encrypted protocol

NoThis allows connection to lớn an SMTPhường server that requires SSL encryption such as Gmail.Enable TLS encryption automatically

OnWhether lớn enable TLS encryption automatically if a hệ thống supports it, even if the protocol is not mix to "tls".Timeout

60Amount of seconds for the SMTPhường commands to timeout.Turn on the SMTP. keep alive featureEnabling this option will keep the SMTPhường. connection open instead of it being openned and then closed for each mailSMTP.. AUTHENTICATION

Leave sầu blank if your SMTPhường hệ thống does not require authentication.

Username

SMTPhường. Username.

Password

SMTPhường. password.

If you have sầu already entered your password before, you should leave this field blank, unless you want khổng lồ change the stored password. Please note that this password will be stored as plain-text inside thietkewebhcm.com.vn"s core configuration variables.

E-MAIL OPTIONS

E-mail from addressThe e-mail address that all e-mails will be from.E-mail from nameThe name that all e-mails will be from. If left blank will use a default of: Portal Name . Some providers (such as Office365) may ignore this field. For more information, please kiểm tra SMTPhường module documentation và your tin nhắn provider documentation.Allow to lớn send e-mails formatted as HTML

Checking this box will allow HTML formatted e-mails to lớn be sent with the SMTP protocol.SMTPhường CLIENT SETTINGS

Hostname

noreply
domain name.comThe hostname khổng lồ use in the Message-Id và Received headers, and as the default HELO string. Leave sầu blank for using _.HELO

TestThe SMTP.. HELO/EHLO of the message. Defaults to lớn hostname (see above).SEND TEST E-MAIL

E-mail address khổng lồ send a kiểm tra e-mail toType in an address to have a demo e-mail sent there.Enable debugging

Checking this box will print SMTP. message

Enabling Debugging will help know the SMTP isssues, check the project page for other error refrences: https://www.thietkewebhcm.com.vn.org/project/smtp

tinh dầu vape, pod 1 lần