Phpmailer: Smtp Error: Could Not Connect To Smtp Host

  -  

I am having trouble sending mail through PHP but it works when I send mail through Thunderbird.

Bạn đang xem: Phpmailer: smtp error: could not connect to smtp host

This is my thunderbird settings:

Server name: mail.exampleserver.com

Port: 587

Username: user
exampleserver.com

Secure Authentication: No

Connection Security: STARTTLS

This is my PHP code:

$mail = new PHPMailer(); $mail->IsSMTP(); // send via SMTP $mail->Host = SMTP_HOST; // SMTP servers $mail->Port = SMTP_PORT; // SMTP servers $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = SMTP_USER; // SMTP username $mail->Password = SMTP_PASSWORD; // SMTP password $mail->From = MAIL_SYSTEM; $mail->FromName = MAIL_SYSTEM_NAME; $mail->AddAddress($aSecuredGetRequest<"email">); $mail->IsHTML(true); // send as HTMLWhat am I doing wrong here? How can I solve this?


*
May 8in PHPby Kichu•19,040 points •1,169 views
answercomment
flag

Your bình luận on this question:

Your name lớn display (optional):
Email me at this address if a phản hồi is added after mine:Email me if a bình luận is added after mine

Privacy: Your email address will only be used for sending these notifications.

Xem thêm: Facebook Bị Chặn Ở Việt Nam, Vượt Tường Lửa An Toàn Bằng Hotspot Shield


Add commentCancel

No answer to this question. Be the first to respond.

Xem thêm: Hướng Dẫn Cài Đặt Và Sử Dụng Phần Mềm Xseo Seo Website Toàn Diện Phần


Your answer

Your name khổng lồ display (optional):
Email me at this address if my answer is selected or commented on:Email me if my answer is selected or commented on

Privacy: Your e-mail address will only be used for sending these notifications.
Add answer

Related Questions In PHP


0 votes
0 answers

PHPMailer SMTP ERROR: Failed to connect khổng lồ server


This Code:IsSMTP(); // ...READ MORE

Jun 27in PHPby narikkadan•32,880 points •439 views
0 votes
1 answer

Error:Failed khổng lồ connect khổng lồ mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:wampwww iroj egister.php on line 50


Hello
kartik,PHP mail function can send e-mail ...READ MORE

answeredOct 20, 2020in PHPby Niroj•82,800 points •28,644 views
0 votes
1 answer

Error: Global Variable is not accessable lớn local function


Hey kartik,A variable declaredoutsidea function has a ...READ MORE

answeredFeb 19, 2020in PHPby Niroj•82,800 points •324 views
0 votes
2 answers

Error:“Cannot Connect to hệ thống - A network-related or instance-specific error”?


Hello,The "sqlserver error 40" is appears mostly ...READ MORE

answeredAug 18, 2020in PHPby Fantazma•140 points •8,706 views
0 votes
1 answer

Error:Cannot connect to lớn database vps Communications liên kết failure


Hello
kartik,Setting thebind-addressto the server"s network IP ...READ MORE

answeredAug 19, 2020in PHPby Niroj•82,800 points •491 views
0 votes
1 answer

Error: Can"t connect to lớn MySQL server on "my.application.com" (10061)


Hello
kartik,To directly login to lớn a remote ...READ MORE

answeredAug 19, 2020in PHPby Niroj•82,800 points •1,175 views
0 votes
0 answers

Mailer Error: SMTP connect() failed in php mailer( https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting)


Here is code for sending e-mail from ...READ MORE

Jun 2in PHPby Kichu•19,040 points •3,941 views
0 votes
0 answers

phpmailer error "Could not instantiate mail function"


I"m getting the error "Mailer Error: Could ...READ MORE

Jun 13in PHPby narikkadan•32,880 points •564 views
0 votes
1 answer

SMTP connect() failed PHPmailer - PHP


You need to showroom the Host parameter$mail->Host ...READ MORE

answeredFeb 16in Othersby Aditya•7,660 points •1,710 views
0 votes
0 answers

"SMTP Error: Could not authenticate" in PHPMailer


I want to lớn send emails in gmail ...READ MORE

May 7in PHPby narikkadan•32,880 points •2,027 views
Recent in PHP
*

TRENDING CERTIFICATION COURSES
TRENDING MASTERS COURSES
COMPANY
WORK WITH US tải về APP
*
*

CATEGORIES
CATEGORIES
TRENDING BLOG ARTICLES
TRENDING BLOG ARTICLES