Don“t know what happened. Now i can“t send emails with SMTP anymore.
What seems to be the error?
Test Message Sent
The result was:
bool(false)
The full debugging output is shown below:
object(PHPMailer)#4296 (69) {
["Version"]=>
string(5) "5.2.7"
["Priority"]=>
int(3)
["CharSet"]=>
string(5) "UTF-8"
["ContentType"]=>
string(10) "text/plain"
["Encoding"]=>
string(4) "8bit"
["ErrorInfo"]=>
string(22) "SMTP connect() failed."
["From"]=>
string(26) "[email protected]"
["FromName"]=>
string(18) "TƤckningsproffsen"
["Sender"]=>
string(26) "[email protected]"
["ReturnPath"]=>
string(0) ""
["Subject"]=>
string(44) "WP Mail SMTP: Test mail to [email protected]"
["Body"]=>
string(68) "This is a test email generated by the WP Mail SMTP WordPress plugin."
["AltBody"]=>
string(0) ""
["Ical"]=>
string(0) ""
["MIMEBody":protected]=>
string(69) "This is a test email generated by the WP Mail SMTP WordPress plugin.
"
["MIMEHeader":protected]=>
string(471) "Date: Wed, 26 Nov 2014 11:55:36 +0000
Return-Path:
To: [email protected]
From: =?UTF-8?Q?T=C3=A4ckningsproffsen?=
Subject: WP Mail SMTP: Test mail to [email protected]
Message-ID: <[email protected]>
X-Priority: 3
X-Mailer: PHPMailer 5.2.7 (https://github.com/PHPMailer/PHPMailer/)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
"
["mailHeader":protected]=>
string(0) ""
["WordWrap"]=>
int(0)
["Mailer"]=>
string(4) "smtp"
["Sendmail"]=>
string(18) "/usr/sbin/sendmail"
["UseSendmailOptions"]=>
bool(true)
["PluginDir"]=>
string(0) ""
["ConfirmReadingTo"]=>
string(0) ""
["Hostname"]=>
string(0) ""
["MessageID"]=>
string(0) ""
["MessageDate"]=>
string(0) ""
["Host"]=>
string(25) "mail.tackningsproffsen.se"
["Port"]=>
string(3) "587"
["Helo"]=>
string(0) ""
["SMTPSecure"]=>
string(3) "tls"
["SMTPAuth"]=>
bool(true)
["Username"]=>
string(26) "[email protected]"
["Password"]=>
string(9) "example"
["AuthType"]=>
string(0) ""
["Realm"]=>
string(0) ""
["Workstation"]=>
string(0) ""
["Timeout"]=>
int(10)
["SMTPDebug"]=>
bool(true)
["Debugoutput"]=>
string(4) "echo"
["SMTPKeepAlive"]=>
bool(false)
["SingleTo"]=>
bool(false)
["SingleToArray"]=>
array(0) {
}
["do_verp"]=>
bool(false)
["AllowEmpty"]=>
bool(false)
["LE"]=>
string(1) "
"
["DKIM_selector"]=>
string(0) ""
["DKIM_identity"]=>
string(0) ""
["DKIM_passphrase"]=>
string(0) ""
["DKIM_domain"]=>
string(0) ""
["DKIM_private"]=>
string(0) ""
["action_function"]=>
string(0) ""
["XMailer"]=>
string(0) ""
["smtp":protected]=>
object(SMTP)#4326 (12) {
["Version"]=>
string(5) "5.2.7"
["SMTP_PORT"]=>
int(25)
["CRLF"]=>
string(2) "
"
["do_debug"]=>
bool(true)
["Debugoutput"]=>
string(4) "echo"
["do_verp"]=>
bool(false)
["Timeout"]=>
int(10)
["Timelimit"]=>
int(30)
["smtp_conn":protected]=>
bool(false)
["error":protected]=>
NULL
["helo_rply":protected]=>
NULL
["last_reply":protected]=>
string(0) ""
}
["to":protected]=>
array(1) {
[0]=>
array(2) {
[0]=>
string(17) "[email protected]"
[1]=>
string(0) ""
}
}
["cc":protected]=>
array(0) {
}
["bcc":protected]=>
array(0) {
}
["ReplyTo":protected]=>
array(0) {
}
["all_recipients":protected]=>
array(1) {
["[email protected]"]=>
bool(true)
}
["attachment":protected]=>
array(0) {
}
["CustomHeader":protected]=>
array(0) {
}
["lastMessageID":protected]=>
string(59) "<[email protected]>"
["message_type":protected]=>
string(5) "plain"
["boundary":protected]=>
array(3) {
[1]=>
string(35) "b1_13bbb2c93918d0021e9ca3cbbb6abf87"
[2]=>
string(35) "b2_13bbb2c93918d0021e9ca3cbbb6abf87"
[3]=>
string(35) "b3_13bbb2c93918d0021e9ca3cbbb6abf87"
}
["language":protected]=>
array(18) {
["authenticate"]=>
string(35) "SMTP Error: Could not authenticate."
["connect_host"]=>
string(43) "SMTP Error: Could not connect to SMTP host."
["data_not_accepted"]=>
string(30) "SMTP Error: data not accepted."
["empty_message"]=>
string(18) "Message body empty"
["encoding"]=>
string(18) "Unknown encoding: "
["execute"]=>
string(19) "Could not execute: "
["file_access"]=>
string(23) "Could not access file: "
["file_open"]=>
string(33) "File Error: Could not open file: "
["from_failed"]=>
string(35) "The following From address failed: "
["instantiate"]=>
string(36) "Could not instantiate mail function."
["invalid_address"]=>
string(15) "Invalid address"
["mailer_not_supported"]=>
string(25) " mailer is not supported."
["provide_address"]=>
string(54) "You must provide at least one recipient email address."
["recipients_failed"]=>
string(45) "SMTP Error: The following recipients failed: "
["signing"]=>
string(15) "Signing Error: "
["smtp_connect_failed"]=>
string(22) "SMTP connect() failed."
["smtp_error"]=>
string(19) "SMTP server error: "
["variable_set"]=>
string(30) "Cannot set or reset variable: "
}
["error_count":protected]=>
int(2)
["sign_cert_file":protected]=>
string(0) ""
["sign_key_file":protected]=>
string(0) ""
["sign_key_pass":protected]=>
string(0) ""
["exceptions":protected]=>
bool(true)
}
The SMTP debugging output is shown below:
SMTP -> ERROR: Failed to connect to server: Connection timed out (110)
Maybe the server is down? I hope you masked the password yourself otherwise I'd advice you to change it immediately
I wouldn't post this bug if I haven't already checked the obvious. ;) Ofc the server is up.
And yes, I masked the password.
But I cannot connect to mail.tackningsproffsen.se on port 25 using telnet. Therefore I really think it's a problem with the server.
Indeed, it really doesn't look like the server is up - it's not responding on port 25, 465 or 587, so the error message it gave was entirely accurate. It is responding to pings, so it's definitely there, it just doesn't seem interested in receiving email.
BTW you're also using an old version of PHPMailer.
@Synchro @ooxi
Hey, don“t close so fast. mail.tackningsproffsen.se isn“t pingable beacuse it“s going trhu mail.citynetwork.se and the mail is hosted at citywork.se so the mail isn“t direct on _my_ server.
I tested to login and both send and receive emails from [email protected] and it works. So no, your assumption that the server is down is wrong.
Please reopen and investigate.
Uhm, I don't think that's their job to investigate. You can always hire a consultant if you like.
@michield
Sorry, but isn“t you keen to solve bugs? I can do the investigate-stuff, but tell me that I should do.
Btw, the same settings work on fsgo.se. So something is wrong...
well, I think the key thing you need to read is the comment by @Synchro
https://github.com/PHPMailer/PHPMailer/issues/324#issuecomment-64641222
Once you are working with the latest code, then yes, it is useful to find bugs, and yes, the best way to resolve them is to send a PR. Often things only go wrong in very specific situations, which is hard to replicate for others. Giving us root access to your servers would be one option. Fixing it yourself and sending a PR the other.
If you want to complain that it's not working with a specific server, then make it clear which one that is. In your code you have set Host to mail.tackningsproffsen.se, which is unresponsive, and explains exactly the symptom you are seeing, yet now you say that's not the server you're having trouble with. You say that the same code is working on a different server, which suggests it's the server that's the problem (or access to it), not the code. Right now we have absolutely nothing to go on.
@Synchro
If you want to complain
Hmm, don“t like your attitude.
FYI I“m not a dev, I“m a user. I build servers, don“t code in PHP. That“s your job.
Sigh
You post a random bit of output, no code, and demand that it's fixed. All the evidence you provide points to your server being down, exactly in agreement with the error message your'e getting, i.e. it appears that PHPMailer is working precisely as designed. Later you reveal that it wasn't this server, and whinge when I ask which one it is. You deliberately fail to answer straightforward questions, then insult me and demand I fix your code (which you have still failed to post), all for nothing. You're apparently unfamiliar with the basic tenets of open source development, so you should probably read this, and perhaps get up to speed on how to write a bug report that someone will want to fix
If you're not a programmer, why are you using a programming library? PHPMailer does absolutely nothing unless you write some code to drive it. PHPMailer can't fix your server.
If this isn't your problem, tell us what is, and post your code, along with accurate steps to reproduce the problem reliably. Not too hard is it?
Nice, I didn't know Robert Fischer's post, but it's good!
Ok, I“m sorry. I found the issue. I had the wrong password.
So please tell me, how do I update PHPMailer? Download the tar or zip, and then unpack it in Wordpress? Or is PHPmailer updated automatically with Wordpress?
You can update PHPMailer manually, but you may find that doing so prevents you from applying updates via wordpress in future, so if it's now working for you, I'd suggest you just leave it and let wordpress update it in future.
@Synchro I've found the error doing the same on another domain.
Notice it says [email protected] and not [email protected]
["lastMessageID":protected]=>
string(52) "<[email protected]>"
["message_type":protected]=>
string(5) "plain"
["boundary":protected]=>
array(3) {
[1]=>
string(35) "b1_2db54bb921010fcd42ec0e912cb57f33"
[2]=>
string(35) "b2_2db54bb921010fcd42ec0e912cb57f33"
[3]=>
string(35) "b3_2db54bb921010fcd42ec0e912cb57f33"
}
If the domain is without a subdomain it works, but as long as it's a subdomain e.g. shop, www, or subdomain it doesn't work. Isn't this a bug after all?
(And this time it isn't the wrong password)
Check it - make sure that DNS lookups for those domains work correctly on your server, and see if you can make connections outside of PHP - as the PHPMailer troubleshooting guide suggests. PHPMailer doesn't make timeouts deliberately - if a server fails to respond, it's not the fault of the client code trying to connect to it, just as if a web server dies, you'll get timeouts in your browser, but the problem is nothing to do with the browser.
Versions:
WordPress: 4.9.1
WordPress MS: No
PHP: 5.6.31
WP Mail SMTP: 1.2.2
Params:
Mailer: smtp
Constants: No
ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Host: smtp.cigkoftesiparisi.com
Port: 587
SMTPSecure: string(0) ""
SMTPAutoTLS: bool(false)
SMTPAuth: bool(true)
Server:
OpenSSL: Yes
Apache.mod_security: No
SMTP Debug:
2018-01-04 07:38:25 Connection: opening to smtp.cigkoftesiparisi.com:587, timeout=300, options=array (
)
2018-01-04 07:39:28 Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): unable to connect to smtp.cigkoftesiparisi.com:587 (Connection timed out)
2018-01-04 07:39:28 SMTP ERROR: Failed to connect to server: Connection timed out (110)
2018-01-04 07:39:28 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
getting error somebody help me
@battalbey Please don't hijack closed, unrelated issues. Read what the error says, do what the guide says. I can get to your server, so it suggests your ISP is blocking outbound SMTP. It's all covered in the guide.