As promised, I’m releasing version 0.8 of the WP Mail SMTP plugin just a few days after WordPress 2.7 was released.
There are some big changes in this version. Firstly, I added option whitelisting to be forward compatible with WordPress. This also makes the plugin compatible with WordPressMU. However, this means version 0.8 is is only compatible with 2.7 or newer. This version will not work on WordPress 2.6.5 or earlier.
I’m going to hold off pushing this update to wordpress.org for a couple of days. I’m hoping to get some feedback from early testers. If there are no disasters, I’ll release 0.8 onto wordpress.org early next week.
Support Questions
If you have a question, please search the questions for 0.7 and the original questions before asking it here.
Please note: If you post email addresses in the body of the comments you will almost certainly receive spam. Please replace all @ symbols with something else when you post the debugging output (not in the email box, just in the comment box).
I want to use your plugin in conjunction with this:
http://wpplugins.com/plugin/76/wordpress-mail-queue-wpmq/
they both rewrite wp_mail(). How can I make this happen? Thanks!
I’m not familiar with that plugin, so I don’t know how the two will interact.
Having problems with sending smtp emails. This is what I am told;
Looks like it is still using the mail() function and not using the SMTP
settings. I say that as I tried to register and mail is in the server’s
sendmail queue and did not go to the mail server.
I dug in to the code and it is sending mail via $General->sendEmail called
from./wp-content/themes/framework/library/includes/registration.php and
function declared in
./wp-content/themes/framework/library/functions/general_functions.php
which in turn tries to use wp_mail and if that fails it tries to use
regular mail() function. Though I can not say for sure if wp_mail is
actually being used and the smtp plugin simply isn’t running properly and
so falling over to mail() or if the mail function is being use. Only way
to know would be to edit the code a bit in the general_functions file and
tack on a note to the messages variable for either one . If you want me to
try this, please let me know.
Okay test showed it is using the regular mail function because wp_mail
failed. Unfortuantely not sure why it failed and would need further
debugging by the plugin developer .
Any Help Appreciated,
Bob
.
The plugin was downloaded 451 times today, 398 times so far today, 3’452 times last week. I don’t mean to be dismissive, but the code works. The plugin is very simple, it uses functionality that’ built right into WordPress. This plugin merely activates that functionality, which is otherwise simply left dormant. There have been one or two small bugs with sender settings over the years that this plugin has been active, but it’s been a long while since any of those were reported, and your message doesn’t point to a specific bug, it’s more of a general “ask the developer to debug, maybe it’s not working” type message. So in response to that, I can say with some degree of certainty, the code works, the plugin behaves as expected.
If your configuration is accurate for your server environment, it should work. Have you tried using the in-built test functionality? Do you get any feedback from that? It looks from your message like the framework theme has it’s own way of sending mails. I’d suggest debugging starting there.
Hi Callum,
Thank you for your quick reply. I was told this is the best smtp plug-in in use today. My problem is that I am not a coder, programmer or designer. I purchased this wp_theme from Templatic 7 weeks ago and between Templatic and my Hosting Company who has done more than their share to try and help me we still have NO SMTP emails. So you can see my situation I hope, you are the last hope before I can this whole project. 7 Weeks and NO one can fix this thing.
Thanks,
Bob
Bob, I’ll do what I can to help you. The first step is for you to answer my specific questions clearly and precisely. I’ll repeat: Have you tried using the in-built test functionality?
Specifically, I mean, go to Options > Advanced Email Options in the admin page and send a test message. Do you get a true or false result?
OK, here is the Test Email;
Test Message Sent
The result was:
bool(false)
The full debugging output is shown below:
object(PHPMailer)#66 (44) {
["Priority"]=>
int(3)
["CharSet"]=>
string(5) “UTF-8″
["ContentType"]=>
string(10) “text/plain”
["Encoding"]=>
string(4) “8bit”
["ErrorInfo"]=>
string(43) “SMTP Error: Could not connect to SMTP host.”
["From"]=>
string(25) “no-reply@oldtimerrubs.com”
["FromName"]=>
string(27) “Old Timer Rubs & Seasonings”
["Sender"]=>
string(0) “”
["Subject"]=>
string(44) “WP Mail SMTP: Test mail to bobg276@gmail.com”
["Body"]=>
string(68) “This is a test email generated by the WP Mail SMTP WordPress plugin.”
["AltBody"]=>
string(0) “”
["WordWrap"]=>
int(0)
["Mailer"]=>
string(4) “smtp”
["Sendmail"]=>
string(18) “/usr/sbin/sendmail”
["PluginDir"]=>
string(0) “”
["Version"]=>
string(5) “2.0.4″
["ConfirmReadingTo"]=>
string(0) “”
["Hostname"]=>
string(0) “”
["MessageID"]=>
string(0) “”
["Host"]=>
string(21) “mail.oldtimerrubs.com”
["Port"]=>
string(2) “25″
["Helo"]=>
string(0) “”
["SMTPSecure"]=>
string(0) “”
["SMTPAuth"]=>
bool(true)
["Username"]=>
string(25) “no-reply@oldtimerrubs.com”
["Password"]=>
string(10) “”
["Timeout"]=>
int(10)
["SMTPDebug"]=>
int(2)
["SMTPKeepAlive"]=>
bool(false)
["SingleTo"]=>
bool(false)
["smtp"]=>
object(SMTP)#67 (7) {
["SMTP_PORT"]=>
int(25)
["CRLF"]=>
string(2) ”
”
["do_debug"]=>
int(2)
["do_verp"]=>
bool(false)
["smtp_conn"]=>
resource(147) of type (stream)
["error"]=>
array(3) {
["error"]=>
string(11) “RSET failed”
["smtp_code"]=>
bool(false)
["smtp_msg"]=>
bool(false)
}
["helo_rply"]=>
string(120) “250-mail8.hspheredns.com
250-PIPELINING
250-8BITMIME
250-SIZE 20971520
250-AUTH LOGIN PLAIN CRAM-MD5
250 STARTTLS
”
}
["to"]=>
array(1) {
[0]=>
array(2) {
[0]=>
string(17) “bobg276@gmail.com”
[1]=>
string(0) “”
}
}
["cc"]=>
array(0) {
}
["bcc"]=>
array(0) {
}
["ReplyTo"]=>
array(0) {
}
["attachment"]=>
array(0) {
}
["CustomHeader"]=>
array(0) {
}
["message_type"]=>
string(5) “plain”
["boundary"]=>
array(2) {
[1]=>
string(35) “b1_7c83d2dc047a3137ada3f1a5cb58f03e”
[2]=>
string(35) “b2_7c83d2dc047a3137ada3f1a5cb58f03e”
}
["error_count"]=>
int(2)
["LE"]=>
string(1) ”
”
["sign_cert_file"]=>
string(0) “”
["sign_key_file"]=>
string(0) “”
["sign_key_pass"]=>
string(0) “”
}
The SMTP debugging output is shown below:
SMTP -> FROM SERVER:
220 mail8.hspheredns.com ESMTP
SMTP -> FROM SERVER:
250-mail8.hspheredns.com
250-PIPELINING
250-8BITMIME
250-SIZE 20971520
250-AUTH LOGIN PLAIN CRAM-MD5
250 STARTTLS
SMTP -> ERROR: Password not accepted from server: 535 authorization failed (#5.7.0)
SMTP -> FROM SERVER:
SMTP -> ERROR: RSET failed:
Come on Bob, I want to help you here. Did you read the error message you posted? Here’s the salient part:
It would appear the password is wrong. Which is probably a good thing as you copied / pasted in in plain text. I recommend you change it immediately.
OK correct paswrd. but still no emails.
Test Message Sent
The result was:
bool(true)
The full debugging output is shown below:
object(PHPMailer)#66 (44) {
["Priority"]=>
int(3)
["CharSet"]=>
string(5) “UTF-8″
["ContentType"]=>
string(10) “text/plain”
["Encoding"]=>
string(4) “8bit”
["ErrorInfo"]=>
string(0) “”
["From"]=>
string(25) “no-reply@oldtimerrubs.com”
["FromName"]=>
string(27) “Old Timer Rubs & Seasonings”
["Sender"]=>
string(0) “”
["Subject"]=>
string(49) “WP Mail SMTP: Test mail to sub@dfaphotography.com”
["Body"]=>
string(68) “This is a test email generated by the WP Mail SMTP WordPress plugin.”
["AltBody"]=>
string(0) “”
["WordWrap"]=>
int(0)
["Mailer"]=>
string(4) “smtp”
["Sendmail"]=>
string(18) “/usr/sbin/sendmail”
["PluginDir"]=>
string(0) “”
["Version"]=>
string(5) “2.0.4″
["ConfirmReadingTo"]=>
string(0) “”
["Hostname"]=>
string(0) “”
["MessageID"]=>
string(0) “”
["Host"]=>
string(21) “mail.oldtimerrubs.com”
["Port"]=>
string(2) “25″
["Helo"]=>
string(0) “”
["SMTPSecure"]=>
string(0) “”
["SMTPAuth"]=>
bool(true)
["Username"]=>
string(25) “no-reply@oldtimerrubs.com”
["Password"]=>
string(12) “”
["Timeout"]=>
int(10)
["SMTPDebug"]=>
int(2)
["SMTPKeepAlive"]=>
bool(false)
["SingleTo"]=>
bool(false)
["smtp"]=>
object(SMTP)#67 (7) {
["SMTP_PORT"]=>
int(25)
["CRLF"]=>
string(2) ”
”
["do_debug"]=>
int(2)
["do_verp"]=>
bool(false)
["smtp_conn"]=>
int(0)
["error"]=>
NULL
["helo_rply"]=>
NULL
}
["to"]=>
array(1) {
[0]=>
array(2) {
[0]=>
string(22) “sub@dfaphotography.com”
[1]=>
string(0) “”
}
}
["cc"]=>
array(0) {
}
["bcc"]=>
array(0) {
}
["ReplyTo"]=>
array(0) {
}
["attachment"]=>
array(0) {
}
["CustomHeader"]=>
array(0) {
}
["message_type"]=>
string(5) “plain”
["boundary"]=>
array(2) {
[1]=>
string(35) “b1_833f78466b8007bb17b23acf811e681f”
[2]=>
string(35) “b2_833f78466b8007bb17b23acf811e681f”
}
["error_count"]=>
int(0)
["LE"]=>
string(1) ”
”
["sign_cert_file"]=>
string(0) “”
["sign_key_file"]=>
string(0) “”
["sign_key_pass"]=>
string(0) “”
}
The SMTP debugging output is shown below:
SMTP -> FROM SERVER:
220 mail8.hspheredns.com ESMTP
SMTP -> FROM SERVER:
250-mail8.hspheredns.com
250-PIPELINING
250-8BITMIME
250-SIZE 20971520
250-AUTH LOGIN PLAIN CRAM-MD5
250 STARTTLS
SMTP -> FROM SERVER:
250 ok
SMTP -> FROM SERVER:
250 ok
SMTP -> FROM SERVER:
354 go ahead
SMTP -> FROM SERVER:
250 ok 1305333091 qp 18514
SMTP -> FROM SERVER:
221 mail8.hspheredns.com
Let me rephrase that, I got the Test email but am not getting all the Registration emails and purchase products emails.
Bob
Next step is to check the mail logs on the smtp server. The mail was successfully delivered and accepted, so the plugin and WordPress are working as expected.
I don’t know what to tell you Bob. According to the test you ran, the plugin is working fine and wp_mail() is sending via SMTP. I’d suggest the issue lies in the code / theme / plugin that you’re using. I suggest going back to that side now that you have the correct password. Please note you pasted your password as part of the debugging output in plain text, so it’s now visible here. I recommend changing it immediately.
Good Afternoon Callum,
Thanks for all the help on the plug-in. I will move to the next area and see what we find.
Thanks again,
Bob
Hello, I am running wordpress site with WAMP locally.
I have wp-mail-smtp plugin installed, and set send e-mail via Gmail option checked.
I put correct email address and password but
I get this error when I press test button:
An error was encountered while trying to send the test e-mail.
SMTP Error: Could not connect to SMTP host.
Failed to connect to server
Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?
Do you have any idea what else I must do to make the plugin work?
Hopefully you can help me with this problem…
I’m not exactly sure what is required. I think something is missing from your WAMP stack, namely ssl support. But how you’d go about installing that, I’ve no idea I’m afraid. I have zero experience hosting on Windows. If you do find a solution, I’d be grateful if you share it back here to help future searchers.
hey go to WAMP server settings, there in PHP extensions check mark
php_openssl.
It worked out for me. Hope its does it for you too.
Hi,
I have just installed your WP mail SMTP plug in. The test mail works, interestingly, when I send to: ingewoudstra@mumandcareer.co.uk (which is also the address I use in the ‘send from’ box). However when I try sending it to my other e-mail address: imvangrondelle@btinternet.com, your log (which is great to have!) returns an error ‘could not send to imvangrondelle@btinternet.com. Any ideas as to what might be going on? I suspect it’s nothing to do with your plug-in but just thought you might have some clues…?
What does the error message say? The clue’s probably there…
I’d guess that you’re not using authentication, or something’s going wrong with authentication. If you send mail to blah.com via the blah.com mail server, the server accepts the message without authentication because it’s the destination for the message. But if you’re trying to send to other.com through blah.com, they won’t relay (pass on) the message for you without a username and password. Hence, it works for your own address, but not for other addresses.
Hi, thanks so much for the amazingly fast response. and sensible too. I now added the smtp authentication and even managed to find the right password to my server. But, to no avail. Same thing happens, with no other error messages than:
string(85) “SMTP Error: The following SMTP Error: Data not accepted.imvangrondelle@btinternet.com”
["From"]=>
I could easily understand if you have no further clues either, but as you have all the superior knowledge here I am just trying and hoping you might be willing to help.
Can you send mail through that server with a regular mail client (program)? The error data not accepted suggests that the server is rejecting the message for some reason. Why, I’m not sure, you could ask the mail server administrator, they might know more.
Thanks so much for trying. Yes the e-mail address works fine otherwise, and I can e.g. send from ingewoudstra@mumandcareer.co. uk (on my one server) to imvangrondelle@btinternet.com (on the other server). Weird…
Thanks for your help.
I am having a very similar issue. Mail server works fine, i have verified and checked username and password. I am getting error (111), here is a snippet from error log
Test Message Sent
The result was:
bool(false)
The full debugging output is shown below:
object(PHPMailer)#335 (44) {
["Priority"]=>
int(3)
["CharSet"]=>
string(5) "UTF-8"
["ContentType"]=>
string(10) "text/plain"
["Encoding"]=>
string(4) "8bit"
["ErrorInfo"]=>
string(43) "SMTP Error: Could not connect to SMTP host."
......
.......
["Host"]=>
string(20) "mail.mailserver.com"
["Port"]=>
string(2) "25"
["Helo"]=>
string(0) ""
["SMTPSecure"]=>
string(0) ""
["SMTPAuth"]=>
bool(true)
["Username"]=>
string(23) "email@here.com"
["Password"]=>
string(11) "passwordhere"
.........
..........
}
The SMTP debugging output is shown below:
SMTP -> ERROR: Failed to connect to server: Connection refused (111)
Could there be an issue with a theme or plugin as i see a lot of people having the same issue.
This is the most common error message, it’s the first error on the plugin page. I don’t have anything to add to what I’ve written there.
Hi Callum
Having some weird site issues that I was hoping you could help with. Let me start off first by saying this has nothing to do with your plugin…It seems to work fine. In fact it works on one page of my word press site, and not another page. Seeing that you are a Word Press expert…I was hoping you could help me out. I can pay you for your time if necessary.
If you look at the index page for the following site http://www.earlygrind.com/ there is a small contact form just above the footer. I am using Contact Form 7 for this contact form. You will see that this contact form works fine.
Now…If you look at the contact page for the same site http://www.earlygrind.com/?page_id=57 there is a similar contact form. I am also using Contact Form 7 for this contact form. You will see that this contact form does not work.
I am literally stuck. I am not a developer, and will not be able to debug this word press site.
I am really hoping that you might be able to lend your advise.
Thanks…Randall
I’m not sure what to suggest. It sounds like the issue lies somewhere with the configuration or setup of the contact forms. Are they both set to send emails to the same destination address? Try using the email test feature to check all the addresses if they are different. Otherwise, I recommend asking the Contact Form 7 plugin author to see if they can shed any light on what’s going on. Sorry I can’t be of more help at this time.
I have 3 WordPress sites running on a single Apache server (Ubuntu 8.04, Apache 2.x, PHP 5.2.4, MySQL 5.0.51). I am running the current version of WP (as of last Wednesday). Each site is in a separate subdirectory (i.e. /var/www/site1/htdocs, /var/www/site2/htdocs, /var/www/site3/htdocs). I am running the default TwentyTen theme on all 3. All 3 sites work flawlessly as far as I can see. I have installed the WP-Mail-SMTP plugin on all 3 servers. I expect these to be low traffic sites and want to get an email when there’s a new comment. On 2 of the 3 sites the plugin works great and I get sent email whenever comments are added. On the 3rd site I don’t get any email. The ‘Email’ page in ‘Settings’ are all setup the same. The ‘Test Email’ works fine on all 3 sites. I can’t imagine that it matters, but the only difference I can see between the sites is that the 2 that work have a ‘static page’ for their home page and the 1 that doesn’t work has a home page that lists recent posts. The problem might be that WP isn’t attempting to send the mail or it might be that it’s trying and is failing. Is there a way to see a log much like is shown when I send a ‘Test’? Any other thoughts?
I also wrote a plugin called WP Mail Log. It logs every call to the wp_mail() function and can be useful for debugging these kinds of issues. I published the code on WordPress.org, you might find it useful.
I was noticing that my Gravity Forms notifications were not being sent, so I installed your plugin and got it working using SMTP. I would like to use PHPmailer for all sites on my server. I’ve been updating and modifying my server to get Sendmail to work properly and I’ve been using your plugin to test this.
I used to get a bool(false) using the PHP Mailer settings and after changing some server/host settings, I now get a bool(true) using the PHP Mailer, but still no emails are being sent.
Any ideas why?
I’m not quite sure what you mean. PHPMailer is the class that ships with WordPress. It allows PHP to send mails, either by SMTP or other methods. The bool(true) result means that the message was accepted by the transport mechanism (mail(), SMTP, etc). It doesn’t actually mean that the message will be delivered. It only tells you that WordPress was successfully able to pass the message along to the next link in the chain. If that next link is misconfigured or malfunctioning, then the message may disappear and never reach its destination. I suggest checking the mail logs for whichever method you’re using, perhaps you’ll find some answers in there.
Thanks for the reply Callum.
I’m sorry I was using the wrong terminology. I got the mail() mechanism to work on my server. The mail() was working but the server couldn’t find the correct sendmail directory.
Hello, First let me start by saying Thank you for this plugin, its great!
I have been using it for about 2 months & it was working great, then it suddenly stopped.
My hosting is with GoDaddy on linux
im using a business gMail account, the same email address that I used for this posting.
I have all the correct settings, like I said it was working.
smtp.gmail.com , 465, ssl, auth, username & password…
So it stopped working on 3 sites I have, with all 3 differnt email accounts on 3 differnt domains.
I know the problem is NOT with your plugin, it must be with GoDaddy blocking something.
im just wondering if you know about it & if there is any kind of work around?
Thanks
wow, sorry, I forgot to paste the result code…
Test Message Sent
The result was:
bool(false)
The full debugging output is shown below:
object(PHPMailer)#345 (44) {
["Priority"]=>
int(3)
["CharSet"]=>
string(5) “UTF-8″
["ContentType"]=>
string(10) “text/plain”
["Encoding"]=>
string(4) “8bit”
["ErrorInfo"]=>
string(43) “SMTP Error: Could not connect to SMTP host.”
["From"]=>
string(21) “***@*******.com”
["FromName"]=>
string(4) “RobR”
["Sender"]=>
string(0) “”
["Subject"]=>
string(41) “WP Mail SMTP: Test mail to ***@*******.com”
["Body"]=>
string(68) “This is a test email generated by the WP Mail SMTP WordPress plugin.”
["AltBody"]=>
string(0) “”
["WordWrap"]=>
int(0)
["Mailer"]=>
string(4) “smtp”
["Sendmail"]=>
string(18) “/usr/sbin/sendmail”
["PluginDir"]=>
string(0) “”
["Version"]=>
string(5) “2.0.4″
["ConfirmReadingTo"]=>
string(0) “”
["Hostname"]=>
string(0) “”
["MessageID"]=>
string(0) “”
["Host"]=>
string(14) “smtp.gmail.com”
["Port"]=>
string(3) “465″
["Helo"]=>
string(0) “”
["SMTPSecure"]=>
string(3) “ssl”
["SMTPAuth"]=>
bool(true)
["Username"]=>
string(21) “***@*******.com”
["Password"]=>
string(8) “***************”
["Timeout"]=>
int(10)
["SMTPDebug"]=>
int(2)
["SMTPKeepAlive"]=>
bool(false)
["SingleTo"]=>
bool(false)
["smtp"]=>
object(SMTP)#211 (7) {
["SMTP_PORT"]=>
int(25)
["CRLF"]=>
string(2) ”
”
["do_debug"]=>
int(2)
["do_verp"]=>
bool(false)
["smtp_conn"]=>
bool(false)
["error"]=>
array(3) {
["error"]=>
string(27) “Failed to connect to server”
["errno"]=>
int(111)
["errstr"]=>
string(18) “Connection refused”
}
["helo_rply"]=>
NULL
}
["to"]=>
array(1) {
[0]=>
array(2) {
[0]=>
string(14) “***@*******.com”
[1]=>
string(0) “”
}
}
["cc"]=>
array(0) {
}
["bcc"]=>
array(0) {
}
["ReplyTo"]=>
array(0) {
}
["attachment"]=>
array(0) {
}
["CustomHeader"]=>
array(0) {
}
["message_type"]=>
string(5) “plain”
["boundary"]=>
array(2) {
[1]=>
string(35) “b1_71a0d2042be594f6074dcd4e47219acc”
[2]=>
string(35) “b2_71a0d2042be594f6074dcd4e47219acc”
}
["error_count"]=>
int(1)
["LE"]=>
string(1) ”
”
["sign_cert_file"]=>
string(0) “”
["sign_key_file"]=>
string(0) “”
["sign_key_pass"]=>
string(0) “”
}
The SMTP debugging output is shown below:
SMTP -> ERROR: Failed to connect to server: Connection refused (111)
ok, so I just sent a contact form using the same account from a zencart form & it worked…
Now I am unsure of whats going on…
I’m not sure what is causing your issues. Have you upgraded the WordPress version maybe? Or any other changes? I’d assume something had to change on the server if mail stopped working across 3 independent WordPress sites.
I have tried using the previous version of your plugin, and wordpress versions from 3.0.5 – 3.1.3
So it must be something to do with GoDaddys hosting…
I also installed a 4th site, without changing anything & installed wp-mail-smtp latest version on both & the same results…
So it looks like GoDaddy is blocking it.
If you would like, I can setup a site with access to the MySQL database & FTP Access for you to play with it.
(Im not asking you to fix it, its obviously not your problem, im only saying since you problably dont have a godaddy account & if you want to try to figure out a solution, I have no problem letting you use one of mine… just an offer
)
I will have to move my hosting away from godaddy to HostGator… I tested everything there & it all works fine.
I think GoDaddy might block outgoing SMTP connections. Have you tried using their outging SMTP relay? The details are buried somewhere in this comment history I think it’s relay-hosting.secureserver.net with no SMTP authentication. Does that work for you? Emails might be flagged as spam from that server though, as I’m guessing it gets a lot of traffic.
Ya, it doesnt allow Yahoo, hotmail, or a few other domains to fill out forms on the sites…
Thats why I wanted to use your plugin…
GoDaddy sucks…
I will be moving those sites and using your stuff once I do that…
Thanks for your support, I will show mine as soon as i move the sites….
hi,
I configured email plug-in and was successful in sending out emails. Now all of sudden it isn’t functioning properly. please help me out. here goes the output
Test Message Sent
The result was:
bool(false)
The full debugging output is shown below:
object(PHPMailer)#112 (44) {
["Priority"]=>
int(3)
["CharSet"]=>
string(5) “UTF-8″
["ContentType"]=>
string(10) “text/plain”
["Encoding"]=>
string(4) “8bit”
["ErrorInfo"]=>
string(75) “The following From address failed: blog.chethanatrust@tapintoinnovation.com”
["From"]=>
string(40) “blog.chethanatrust@tapintoinnovation.com”
["FromName"]=>
string(4) “Blog”
["Sender"]=>
string(40) “blog.chethanatrust@tapintoinnovation.com”
["Subject"]=>
string(47) “WP Mail SMTP: Test mail to vibha16488@gmail.com”
["Body"]=>
string(68) “This is a test email generated by the WP Mail SMTP WordPress plugin.”
["AltBody"]=>
string(0) “”
["WordWrap"]=>
int(0)
["Mailer"]=>
string(4) “smtp”
["Sendmail"]=>
string(18) “/usr/sbin/sendmail”
["PluginDir"]=>
string(0) “”
["Version"]=>
string(5) “2.0.4″
["ConfirmReadingTo"]=>
string(0) “”
["Hostname"]=>
string(0) “”
["MessageID"]=>
string(0) “”
["Host"]=>
string(24) “smtpout.secureserver.net”
["Port"]=>
string(2) “80″
["Helo"]=>
string(0) “”
["SMTPSecure"]=>
string(0) “”
["SMTPAuth"]=>
bool(false)
["Username"]=>
string(0) “”
["Password"]=>
string(0) “”
["Timeout"]=>
int(10)
["SMTPDebug"]=>
int(2)
["SMTPKeepAlive"]=>
bool(false)
["SingleTo"]=>
bool(false)
["smtp"]=>
object(SMTP)#111 (7) {
["SMTP_PORT"]=>
int(25)
["CRLF"]=>
string(2) ”
”
["do_debug"]=>
int(2)
["do_verp"]=>
bool(false)
["smtp_conn"]=>
int(0)
["error"]=>
array(1) {
["error"]=>
string(38) “Called Reset() without being connected”
}
["helo_rply"]=>
NULL
}
["to"]=>
array(1) {
[0]=>
array(2) {
[0]=>
string(20) “vibha16488@gmail.com”
[1]=>
string(0) “”
}
}
["cc"]=>
array(0) {
}
["bcc"]=>
array(0) {
}
["ReplyTo"]=>
array(0) {
}
["attachment"]=>
array(0) {
}
["CustomHeader"]=>
array(0) {
}
["message_type"]=>
string(5) “plain”
["boundary"]=>
array(2) {
[1]=>
string(35) “b1_7bd33857d376d3ad2ce986f71e21fa13″
[2]=>
string(35) “b2_7bd33857d376d3ad2ce986f71e21fa13″
}
["error_count"]=>
int(1)
["LE"]=>
string(1) ”
”
["sign_cert_file"]=>
string(0) “”
["sign_key_file"]=>
string(0) “”
["sign_key_pass"]=>
string(0) “”
}
The SMTP debugging output is shown below:
SMTP -> FROM SERVER:
SMTP -> NOTICE:
EOF caught while checking if connected
Hi Callum,
I was having problems using your plugin. Turns out my host (Bluehost) blocks SMTP by default. It might be good to make a note of that because I think many people setup your plugin correctly and can’t figure out why it doesn’t work.
Thanks for sharing.
Hi
I’m having troubles using your plug-in.
when I ask to get a test email, it workd perfectly.
when I’m using a contact form , I’ve a successfull sent meassage but I don’t get anything…..
Using Contact Form 7 to set up personalized forms, I’m getting email too.
Do you know what’s the issue?
I’m using WP 3.2 , your 0.9.0 plug-in version with Striking theme 3.0
Thanks for your help
Michael
I don’t understand your message. Your contact form does not work? I’m not sure why that is. WP Mail SMTP modifies how the wp_mail() function sends email. If the test email function works, and things like “Forgotten password” emails work, then the plugin is performing as expected. If there’s an issue with a contact form, I’m not sure what might be causing the problem.
I don’t understand either….
I’ve updated the striking theme and now I get all emails!!!
the only thing I’ve done is to move from “inactive” to “active” the contact form widget.
Sorry for the alert
Callum, I have the WP SMTP MAIL v0.9 plug-in installed on WordPress 3.1.3. I am receiving the following errors when I try to send out a test email: 111 1.1.1 sender domain does not exist and SMTP -> ERROR: DATA not accepted from server: 111 1.1.1 sender domain does not exist. The weird thing is I had wp smtp mail working before I upgraded to wordpress 3.1.3 using the same smtp host, user name, and password as I’m using now. It should be noted that i’m running wordpress on our own in-house windows server and I’m trying to use our company’s email hosting provider as the SMTP host. Can you tell me if this could be an issue with the coding like adding “wp_” in front of the mail() function or if I just plain have my smtp host, user name, password wrong? Could the latest version of WordPress make wp smtp mail inoperable? Thank you.
Callum, I solved the issue. The From field was left blank, which I left that way on purpose, because I thought “the default email will be used”. Once I entered a From Email in the field the plug-in worked fine. Thanks for taking the time to create the plug-in.
I’m trying to use your plugin with contact form 7, it works great, but I’m attempting to make this a sign up for a newsletter and the newsletter program (Sendblaster) checks the inbox for certain subject and then pulls in the “from email address” is there any way to make them not show that they all come from the same address?
The only option in the plugin is to modify the default sender from the default of “WordPress”. If the call to wp_mail() sets a custom sender, then this doesn’t apply anyway. I’d guess you need to either change the way Sendblaster picks up emails from your inbox, or change the settings in the contact form. Something like mailchimp would handle all of this for you and give you an HTML form to drop in.
Thanks for the great WP Mail SMTP plugin! It’s incredibly useful on my small VPS where a full blown mail server isn’t exactly viable. I thought I’d share a couple features I’ve added to the plugin that you may consider pulling into the official version:
The password masking has been discussed before. It’s an illusion of security, the data is still readily available to any admin on /options.php. I prefer to have it in plain text and visible so that people understand the lack of security. I’m happy to look at the reply-to change you mentioned. Do you have a patch I can see?
Just before the close of the
phpmailer_init_smptfunction, I added the following:// Add Reply-To header for messages// Fixes the issue of Gmail overriding the From header with the inbox address
$phpmailer->AddReplyTo($phpmailer->From, $phpmailer->FromName);
This has been a life saver however, the first thing I did was change line 301 so that the input field type is “password” rather than “text.” Just not so keen on the idea of people looking over my shoulder being able to see my password unmasked, perhaps worth doing this in your next version?
This has been discussed many times. I think it’s better to have the password in plain text to avoid any illusion of security where none exists.
Hi – love the plug-in, but since upgrading to WP 3.2 I get this error message when I try to send a test
Fatal error: Cannot access protected property PHPMailer::$language in /home/content/54/6801554/html/wp-content/plugins/wp-mail-smtp/wp_mail_smtp.php on line 197
I have changed the file permissions on all the files to 777 and still won’t work.
Well, heck. Even though I got the fatal error in the admin, I received all the test mails. Can’t figure.
It’s just a display bug on output, it doesn’t affect the core functionality of the plugin. It’s fixed in 0.9.1 which is now live on WP.org.
Yep, works, thanks.
Hi there,
I have tried every possible combination to try and setup my google apps smtp. It always gives me the same error with cannot connect to server.
Thanks for ur help,
I refer you to the first error message covered on the plugin page.
I have installed your plug-in and the test email works but initial registration email doesn’t work.(using regular wordpress login/registration form) however account is created and the lost password email works. It’s only the initial email that doesn’t seem to be sent – any ideas? Thank you
I recommend you try installing the WP Mail Log plugin. It will log all the calls to wp_mail() which will hopefully help with debugging. The plugin either works or doesn’t work, but it doesn’t work in halves. So if the test emails work, the plugin is working as expected. All I can really suggest is that the problem lies elsewhere.
Hi Callum,
First off I’d like to say that the plugin is able to send test emails successfully. No doubt about that, yet when I hit the submit button from my contact form. It says “failed to connect to mail server” .I have tried checking the codes in contact page and also the wp_mail.php page or probably i missed out something. One thing I am happy is that the plugin works, so how else do you suggest to get around this problem
What plugin are you using for your Contact Form? If you’re getting all emails except from the form, the problem probably lies there. If you are familiar with PHP, you can check the code to see how the contact form plugin is sending email. If it’s using the mail() function, you can usually just add a wp_ in front, to make it wp_mail() and that will often “just work”.
I am using the wp-mail-smtp plugin for the contact form. Let me explain to you in a better way…I have installed wp-smtp-email plugin. I have filled in my smtp details and I have checked the box which says – use php mail to send email…and when I send the test email, it sends successfully. No matter to which email id I send the test email, it sends the email. Now I go to the contact page, fill in all the details and hit submit button. It says “failed to connect to mail server” . The contact form uses this function “$emailSent = ( @wp_mail( $email_address_to, $subject, $message_contents, $header ) ) ? true : false;”….
After I installed the plugin in wordpress. I did not do any changes in the contact form, if thats what you meant by “you can check the code to see how the contact form plugin is sending email”
I’m not clear where you’re getting the contact form. To the best of my knowledge, WordPress includes no contact form and this plugin certainly does not include a contact form. So I’m assuming you must have another plugin installed which allows you to create a contact form. Did you write the code for the contact form yourself? Do you have a contact form plugin installed? If you deactivate all your plugins, can you still see the contact form? I’m 99% sure the problem lies with the contact form, not with the WP Mail SMTP plugin.
Hi,
I’ve added a new field to the admin page, so that mails sent use a custom mail header. Is there a svn/github repo for the project where i could contribute the changes?
If it helps anyone, here is the diff:
51c51,52
”
—
> ‘smtp_pass’ => ”,
> ‘smtp_custom_header’ => ”
149c150
$phpmailer->AddCustomHeader(get_option(‘smtp_custom_header’));
303a305,310
>
>
>
> <input name="smtp_custom_header" type="text" id="smtp_custom_header" value="” size=”40″ class=”code” />
>
>
456a464
>
Thanks for sharing your change, particularly as a patch, makes life easy.
Do you think this is something that makes sense in the plugin? I imagine that very few people would like to add a custom header, so I wonder if it could be more confusing than beneficial to most users. What do you think?
Glad i could add something to this great project. I think it makes sense to have headers and let me tell you why. I’m using sendgrid.com and you can add a custom header to the emails sent through their system. With this header you can better track the emails (http://sendgrid.com/documentation/display/api/Categories)
I understand that it applies to your specific use case. This is the first time I’ve heard of anyone setting a custom header. My question is whether or not it makes sense to include this functionality for all users of the plugin, or whether it’s better to keep this change only for your version. I think for now I will leave it out. If other people request this feature in the future, I’ll come back to this patch. Again, thanks for sharing.
Hi Callum,
SMTP dose work,I’v got the true result,but i could not recieve any email except the test mail.It seems my site still use mail(),not the SMTP.How to fix it?
As far as I know, WordPress sends all emails through the wp_mail() function. If you’re using custom plugins, they may be sending emails via mail() directly. What emails are you not receiving? If you try the “forgotten password” process for your user, do you receive that email?
No,when I try the “forgotten password” process,I could’t recieve any email.It says the mail() was forbiden.
Try disabling all other plugins. Is the error message the same? What is the exact error message? Can you post a link to a screenshot?
thank you very much.I tried,but the result was the same.It’s the screenshot:www.wangweiblog.com/mx314.png.
It means:Email can’t be send.
maybe:Your host disable the mail() function.
Ok, I tracked down your blog, and tried to recover your password so I could see the error myself. Then I copied the error message in your language and searched the zh_CN.po file for the exact English string, which allowed me to find out where the error is being generated. The wp_mail() function appears to be returning false. Do you have all other plugins disabled on the blog? Do you receive any other emails from the blog? Please answer each question specifically as I need all the information to figure out the problem.
Please make a small change to the wp-login.php file so we can see exactly what is going wrong. Please replace lines 233 and 234 (delete those two) with the following:
if ( $message && !$rslt = wp_mail($user_email, $title, $message) ) {var_dump($rslt);
wp_die( __('The e-mail could not be sent.') . "\n" . __('Possible reason: your host may have disabled the mail() function...') );
}
This will output much more information about why the sending of the message failed. However, it will also reveal that information to anyone who tries to recover a password. I recommend you do the following:
Copy wp-login.php to wp-login.php.orig
Make the changes above
Try to recover your password
View source, copy / paste the entire source code, save in a text file
This file will contain your email password, search for it, delete it, and then send the file to me privately by email
Delete the modified wp-login.php and rename wp-login.php.orig back to wp-login.php
If you are able to follow these steps, I will know much more information about what is causing this error.
The plugin works.Thank you very much.
Great. I’m glad it’s working for you. Would you care to share the solution you found here so other users may read it in the future?
OK.The problem have be solved when I changed my user email.It means the email to send and the email to recieve can’t be the same one when the plugin is working.
Hi, I installed your plugin & the form seemed to crash as the email was submitted on my site. Even now i have un-installed the plugin the form still crashes! I am not blaming your plugin but is there any chance it would not fully un-install and how would I go about checking the code has been fully removed?
If you delete the plugin file from your server, it will have been completely, absolutely, 100% uninstalled. The only thing left are several values in the wp_options table. If you want to remove them, you can find a list here. However, those options are 100% ignored by WordPress itself. So unless you have another plugin installed that is using the same option names, there is zero chance of cross over. After you disable a plugin there’s really no way for it to affect anything.
If you can post details of the specific error you’re seeing, then I may be able to offer more useful advice.
Pingback: 利用SMTP发送Email | 王威的博客
I was having problems getting SMTP to work but found a solution and wrote it up here.
Hello, I installted your plugin on my multisite network and it works great for each site. You recommend entering the smtp settings into wp-config so that they are applied across the network. However am unfamiliar with editing that file. How should I got about inputting the settings? Thanks
There some documentation here.
Thanks very much for this plugin and your hard work. I’ve been using it successfully for quite some time. However I recently migrated my email to Exchange Online and can’t seem to get it to work now. Has anyone had success using this with Exchange Online? According to Microsoft I should be able to relay using authentication over TLS 587. I notice that you mention that your SSL/TLS implementation is not the same as “STARTTLS.” Do you mind telling me how it is different? I suspect this is the problem. I’m receiving a “ERROR: Failed to connect to server:”
Thanks!
Great question. I had no idea of the answer, but I have spent the last 30 minutes reading the code and I have found a change. Since WP 3.2, tls now equals STARTTLS. Previously, the connection was instantiated with tls:// or ssl:// prefixed to the mail server. WP 3.2 now includes PHPMailer version 5.1 which issues the STARTTLS command instead. I think this was related to dropping PHP4 support. So, if you’re using WordPress version 3.2 or higher, then tls = starttls. As for what that means, you can read a little about it here. I’m not sure how your mail server is configured, so I can’t say which approach is more appropriate for your case.
Thanks so much for your help. I upgraded to WordPress 3.2.1 and it now works beautifully!
Hi,
I am using your plugin but the FROM address being used is not the one I have set in the advanced email settings. The from address being used is the USER I am logged in as.
If I send a test email then it sends from the correct address though.
I am using Subscribe2 to send out the emails if that makes any difference.
You could try using the WP Mail Log plugin to see what’s going on under the hood. I’m pretty sure that whatever plugin is setting the from email address, in which case, the WP Mail SMTP plugin will not override it.
Hi Callum,
I am having difficulty with your plugin. I have installed it but cannot activate it or delete it. If I click on any of the options on the plugin page it just takes me to my homepage of my website (frontend). Any ideas?
Cheers
Ian
Can you activate other plugins? If the plugin is not active, it’s having zero effect on your blog. I’m not sure what to suggest. You could try disabling all plugins, then activate them again one at a time, see if you can identify which plugin causes the issue. There may have been a problem during the install, if you used WordPress’s in-built installer. Personally, I’ve never used it, I always upload files manually.
To delete the plugin you can always go to the wp-contents/plugins folder and delete the entire wp-mail-smtp folder, that will remove the plugin completely.
Thanks for your reply Callum. I have now got this plugin working which is a big relief as I run several websites and my host has turned off the mail function! The problem was the other plugins. I had to deactivate them all and then your plugin would work. I filled the details in and turned the other back on and everything works great. Thanks for a lifesaving plugin!
Ian
Hi Callum, actually i love your plugin but I’ve found some kind of bug with another plugin called WPML CMS. It’s a plugin that allows you to have your blog in multiple languages, theme localization with .mo and .po files and content translate.
I’m currently using it, but if active your plugin, suddenly the theme localization regarding .mo and .po files stop to work. I’ve checked it 100% sure. If i deactivate wp-mail-smtp translation plugin works again.
Do you have any clue why this could happen and how to fix it?
If you can post specific error messages I might be able to help. Telling me it does not work is not enough information.
That’s the problem, i don’t get any error.
Usually my home page is 123123123.com.
The english site is 123123123.com/?lang=en
When i activate your plugin, the theme localization stops working, but doesn’t show any error message.
With theme localization i mean all the theme elements from WordPress. Like the “Read more” which should be translated as “Leer más” in Spanish, or “Home” which should be translated as “Inicio”.
It justs shows the default WP_LANG set in wp-config.
Hello Callum,
Thanks for the plug-in.
I got a strange email after running the test option on Advanced Email Options and am wondering what it is about (is it normal, could I have been hacked, etc.).
I am using shared hosting at GoDaddy on Windows. I was able to set up the plug-in and send a test message to my gmail account.
At my gmail account, it went to spam folder. Message says “This is a test email generated by the WP Mail SMTP WordPress plugin.” Okay so far.
But then I got an email to my “From Email Address” in Advanced Email Options. It is an error from qmail-send mailer daemon showing it couldn’t send a message to 20 email address at yahoo, hotmail, etc. like carebear1@hotmail.com.
At the bottom it shows and email with Return-Path as my from email with my Go
Daddy domain name (which I receive emails at in Thunderbird).
Subject: WP Mail SMTP: Test mail to (the email I used on the Advanced Email Options Test)
Body: This is a test email generated by the WP Mail SMTP WordPress plugin.
–
Thanks.
You received a bounceback that looks like a copy of the test message was sent to 20 random email addresses? This sounds very suspicious. There’s definitely nothing in the code to email people at random. It’s possible that your site has been hacked in such a way as to copy all outgoing emails to other addresses. I’m really not sure. Can you check outgoing logs on your mail server to see exactly what’s going on? That would give you the best idea. Or, you could try install the WP Mail Log plugin, that may also help.
Hey Callum,
Do you have any good suggestions to implement digitally signed outgoing emails? With OpenPGP or S/MIME? Would it be possible to build in the function of this plugin:
S/MIME Plugin http://wordpress.org/extend/plugins/smime/
I need to be able to send digitally signed emails from my WPEC e-store and I am going through the gmail apps server. Any advice would be very helpful. Thank you.
Now that’s an awesome question!
I’m not aware of a plugin that combines SMTP with digital signatures. The plugin you linked to would, unfortunately, totally override WP Mail SMTP. So emails would be signed, but sent via mail(). I think it would be relatively easy to get the two plugins to play nicely together. One question, as far as I can tell, the smime plugin looks for the recipient’s key in the user meta table. I’m assuming you want to sign only the emails that are being sent to your site’s users? If you want to sign emails to anyone who signs up, you’ll have to get a mechanism to retrieve their keys.
Are you familiar with PHP at all? I don’t think it would be too much work to get the two plugins talking if you know a bit about PHP. I could provide a little guidance if you like.
Callum,
I am very familiar with plugin and theme development using php. However since you seem to be the best with email related coding would I be able to sponsor some help on this?
Essentially we just need all outgoing emails generated by the WP e-commerce plugin store (probably using the wp_mail) function to be digitally signed since they are going to the shipping facility.
Any ideas?
Interesting challenge. The most elegant method would be to rewrite the smime plugin slightly to use existing hooks. It currently totally replaces the wp_mail() function. This would, hopefully, make it play nicely with other plugins affecting mail (including SMTP). That would be a fairly manageable task, I’ll email you privately to discuss potential deals.
Love the plugin.
I have one minor problem. I’ve set up a “from” and “from name” in the plugin’s control panel, but if I try to send mail from my functions.php, the following code works fine:
$headers = “MIME-Version: 1.0″ . “\r\n”;
$headers .= “Content-type: text/html; charset=”.get_bloginfo(‘charset’).”" . “\r\n”;
and the mail gets sent using the “from” info from the plugin control panel.
But if I add one more line to the functions.php script:
$to = $email ;
$headers = “MIME-Version: 1.0″ . “\r\n”;
$headers .= “Content-type: text/html; charset=”.get_bloginfo(‘charset’).”" . “\r\n”;
$headers .= “From: Website Membership Team” .”\r\n”;
No mail gets sent.
What am I doing wrong?
Lawrence
To the best of my knowledge, a FROM header must be in the format “From: name” or “From:email”, but to omit the email is not possible. I’d guess that’s why mails are failing to send.
If I leave off the “from” iin the functions.php gets mailed. If I try to insert one in code, no email is sent–that’s what’s so confusing.
I’ll try adding an email address in the “from” (e.g., something with an “@”: sign and I’ll see what happens.
Thanks
Lawrence
Hi Callum,
I’m getting this error when testing the plugin:
["mailer_not_supported"]=>
string(25) ” mailer is not supported.”
["execute"]=>
and
SMTP -> ERROR: Failed to connect to server: No route to host (113)
SMTP Error: Could not connect to SMTP host.
What could be wrong? I’m using the smtp server that my hosting company gives me.
Thank you!
I would think it is something on my host (godaddy) because I cant even use it if try to use my gmail account with smtp.gmail.com and my password.
I get this:
SMTP -> ERROR: Failed to connect to server: Connection timed out (110)
SMTP Error: Could not connect to SMTP host.
This is the most common error and it’s documented on the plugin page.
Hi,
I have installed only Your plugin, configured smtp and I can send e-mails, but I don’t know exactly which is the correct name in Your plugin for the mailer.
object(PHPMailer)#278 (53)
Is it correct? Is it not the standard PHP Mailer just with smtp?
Best regards,
Gyurci
I’m sorry, I don’t understand your question. Can you explain your request in more detail to me?
Hi,
I would like to know when I sent the e-mail which was used the PHP Mailer function or the SMTP server. What does it show in Your plugin?
I configured the plugin to use SMTP, but after the sending I can see this line:
object(PHPMailer)#278 (53)
May be it is not correct, I would like to know what should I see in case the correct SMTP using.
I hope now everything is clear enough.
Best regards,
Gyurci
I’m not sure if I 100% understand your question. I think you’re maybe confused about what the PHPMailer is. If you’ve chosen SMTP, then emails are sent by SMTP. If emails are being sent properly, then there’s no problem.
Hi Callum,
Do you have any expericens implementering a DKIM-Signature? I made a start by creating a DKIM keys via http://phpmailer.worxware.com/
I got some files to put on my site, but also an instruction to add some options to my PHPMailer scripts;
$phpmailer->DKIM_domain = ‘leefretail.nl’;
$phpmailer->DKIM_private = ‘/home/leefretail.nl/public_html/.htkeyprivate’;
$phpmailer->DKIM_selector = ‘phpmailer’;
$phpmailer->DKIM_passphrase = ’1316******’;
Is it save to put these lines in your plugin, on the position you indicated ?
Kind regards,
Jeroen van Beusekom
I don’t have experience with this. However, I am talking to another person about developing a plugin that would digitally sign emails. They have offered to fund some of the development. Would you like to join that discussion?
Hi Calum,
bool(false)
The full debugging output is shown below:
object(PHPMailer)#33 (45) {
["Priority"]=>
int(3)
["CharSet"]=>
string(5) “UTF-8″
["ContentType"]=>
string(10) “text/plain”
["Encoding"]=>
string(4) “8bit”
["ErrorInfo"]=>
string(43) “SMTP Error: Could not connect to SMTP host.”
["From"]=>
string(25) “mail@signalxchangeinv.com”
["FromName"]=>
string(26) “Signal Exchange Investment”
["Sender"]=>
string(0) “”
["Subject"]=>
string(46) “WP Mail SMTP: Test mail to xxxxxxx@xxxxx.com”
["Body"]=>
string(68) “This is a test email generated by the WP Mail SMTP WordPress plugin.”
["AltBody"]=>
string(0) “”
["WordWrap"]=>
int(0)
["Mailer"]=>
string(4) “smtp”
["Sendmail"]=>
string(18) “/usr/sbin/sendmail”
["PluginDir"]=>
string(0) “”
["Version"]=>
string(5) “2.0.4″
["ConfirmReadingTo"]=>
string(0) “”
["Hostname"]=>
string(0) “”
["MessageID"]=>
string(0) “”
["Host"]=>
string(14) “smtp.gmail.com”
["Port"]=>
string(3) “465″
["Helo"]=>
string(0) “”
["SMTPSecure"]=>
string(3) “ssl”
["SMTPAuth"]=>
bool(true)
["Username"]=>
string(25) “xxxxxxxl@xxxxxxx.com”
["Password"]=>
string(9) “mail@2011″
["Timeout"]=>
int(10)
["SMTPDebug"]=>
int(2)
["SMTPKeepAlive"]=>
bool(false)
["SingleTo"]=>
bool(false)
["smtp"]=>
object(SMTP)#34 (7) {
["SMTP_PORT"]=>
int(25)
["CRLF"]=>
string(2) ”
”
["do_debug"]=>
int(2)
["do_verp"]=>
bool(false)
["smtp_conn"]=>
bool(false)
["error"]=>
array(3) {
["error"]=>
string(27) “Failed to connect to server”
["errno"]=>
int(10060)
["errstr"]=>
string(185) “A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
”
}
["helo_rply"]=>
NULL
}
["to"]=>
array(1) {
[0]=>
array(2) {
[0]=>
string(19) “xxxxx@xxxx.com”
[1]=>
string(0) “”
}
}
["cc"]=>
array(0) {
}
["bcc"]=>
array(0) {
}
["ReplyTo"]=>
array(0) {
}
["attachment"]=>
array(0) {
}
["CustomHeader"]=>
array(0) {
}
["message_type"]=>
string(5) “plain”
["boundary"]=>
array(2) {
[1]=>
string(35) “b1_2cd63f61b625f4a38647b327586e1b70″
[2]=>
string(35) “b2_2cd63f61b625f4a38647b327586e1b70″
}
["language"]=>
array(13) {
["mailer_not_supported"]=>
string(25) ” mailer is not supported.”
["provide_address"]=>
string(55) “You must provide at least one mailer is not supported.”
["execute"]=>
string(19) “Could not execute: ”
["instantiate"]=>
string(36) “Could not instantiate mail function.”
["authenticate"]=>
string(35) “SMTP Error: Could not authenticate.”
["from_failed"]=>
string(35) “The following From address failed: ”
["data_not_accepted"]=>
string(30) “SMTP Error: Data not accepted.”
["recipients_failed"]=>
string(56) “SMTP Error: The following SMTP Error: Data not accepted.”
["connect_host"]=>
string(43) “SMTP Error: Could not connect to SMTP host.”
["file_access"]=>
string(23) “Could not access file: ”
["file_open"]=>
string(33) “File Error: Could not open file: ”
["encoding"]=>
string(18) “Unknown encoding: ”
["signing"]=>
string(15) “Signing Error: ”
}
["error_count"]=>
int(1)
["LE"]=>
string(1) ”
”
["sign_cert_file"]=>
string(0) “”
["sign_key_file"]=>
string(0) “”
["sign_key_pass"]=>
string(0) “”
}
The SMTP debugging output is shown below:
SMTP -> ERROR: Failed to connect to server: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
(10060)
Please above is error code, I have contact my host on the problem that I’m having wp-smpt plugin with google apps below is their response, I will be glad if you could advise on what else to do because wp-smpt plugin works well with mail account hosted on my host server.
“We are sorry that our previous response did not take into account that your domain emails are not hosted at Utiware. Because you are using Google for your Domain Email, our Utiware SMTP Email Server will not recognize your domain as a valid domain. So, you must also use the Google SMTP server for sending emails from your website. That is how it should work. Please consult the Google documentation for how to use their SMTP Server in your WordPress website.
Thank you very much for choosing Utiware Web Hosting.”
Kind regards,
Olutaller
I’d guess the problem relates to PHP’s fopen() settings. This is the most common error reported. I recommend using your Google mail settings and then asking your hosting company again. As far as I am aware, Google only accepts mail via SMTP, so it’s necessary that your PHP host support fopen() and encrypted connections.
Thanks my host has open the firewall now and everything is ok
Kind regards
Since installing WordPress on my GoDaddy hosting account 2 months ago I have been unable to receive emails sent via a contact form on my website.
I have tried over 6 different contact forms and now I am using a contact form as part of my Woo theme. None have worked.
When sending an email via the contact form – there is no error message – it says the email has been successfully – but it never arrives (it is not in my junk folder).
I have tried the settings for both gmail and my business email tied to my website – using the WP Mail plugin.
GoDaddy have offered no helpful advice.
Here is the latest version of my contact form:
http://www.zorba.com.co/wordpress/bookings
Please help. I am desperate.
Jamie
As per the instructions, please send a test message and then read the output. If you don’t understand it, copy / paste the error message here. Have you looked back on this forum to find posts about godaddy? It’s been asked and answered many times before.
Hi Callum,
Yes, I’ve read all the posts on GoDaddy.
I have tried 2 different SMTP settings.
SMTP Host: relay-hosting.secureserver.net
SMTP Port: 25
SMTP Host: smtpout.secureserver.net
SMTP Port: 80
With both settings, the test email is TRUE. However, only with the latter settings – does the test email actually arrive to my inbox.
With both settings – the contact form appears to work successfully – but never arrives to my inbox.
Here is the output from a test message:
Test Message Sent
The result was:
bool(true)
The full debugging output is shown below:
object(PHPMailer)#216 (53) {
["Priority"]=>
int(3)
["CharSet"]=>
string(5) “UTF-8″
["ContentType"]=>
string(10) “text/plain”
["Encoding"]=>
string(4) “8bit”
["ErrorInfo"]=>
string(0) “”
["From"]=>
string(17) “info@zorba.com.co”
["FromName"]=>
string(11) “zorba tours”
["Sender"]=>
string(0) “”
["Subject"]=>
string(47) “WP Mail SMTP: Test mail to jamiegerig@gmail.com”
["Body"]=>
string(68) “This is a test email generated by the WP Mail SMTP WordPress plugin.”
["AltBody"]=>
string(0) “”
["WordWrap"]=>
int(0)
["Mailer"]=>
string(4) “smtp”
["Sendmail"]=>
string(18) “/usr/sbin/sendmail”
["PluginDir"]=>
string(0) “”
["ConfirmReadingTo"]=>
string(0) “”
["Hostname"]=>
string(0) “”
["MessageID"]=>
string(0) “”
["Host"]=>
string(24) “smtpout.secureserver.net”
["Port"]=>
string(2) “80″
["Helo"]=>
string(0) “”
["SMTPSecure"]=>
string(0) “”
["SMTPAuth"]=>
bool(true)
["Username"]=>
string(17) “info@zorba.com.co”
["Password"]=>
string(8) “XXXXXXX”
["Timeout"]=>
int(10)
["SMTPDebug"]=>
int(2)
["SMTPKeepAlive"]=>
bool(false)
["SingleTo"]=>
bool(false)
["SingleToArray"]=>
array(0) {
}
["LE"]=>
string(1) ”
”
["DKIM_selector"]=>
string(9) “phpmailer”
["DKIM_identity"]=>
string(0) “”
["DKIM_domain"]=>
string(0) “”
["DKIM_private"]=>
string(0) “”
["action_function"]=>
string(0) “”
["Version"]=>
string(3) “5.1″
["smtp:private"]=>
object(SMTP)#217 (7) {
["SMTP_PORT"]=>
int(25)
["CRLF"]=>
string(2) ”
”
["do_debug"]=>
int(2)
["do_verp"]=>
bool(false)
["smtp_conn:private"]=>
resource(171) of type (stream)
["error:private"]=>
NULL
["helo_rply:private"]=>
string(96) “250-smtpauth11.prod.mesa1.secureserver.net
250-AUTH LOGIN PLAIN
250-8BITMIME
250 PIPELINING
”
}
["to:private"]=>
array(1) {
[0]=>
array(2) {
[0]=>
string(20) “jamiegerig@gmail.com”
[1]=>
string(0) “”
}
}
["cc:private"]=>
array(0) {
}
["bcc:private"]=>
array(0) {
}
["ReplyTo:private"]=>
array(0) {
}
["all_recipients:private"]=>
array(1) {
["jamiegerig@gmail.com"]=>
bool(true)
}
["attachment:private"]=>
array(0) {
}
["CustomHeader:private"]=>
array(0) {
}
["message_type:private"]=>
string(5) “plain”
["boundary:private"]=>
array(2) {
[1]=>
string(35) “b1_99ec05614c115ab9c2d46aed777cfefc”
[2]=>
string(35) “b2_99ec05614c115ab9c2d46aed777cfefc”
}
["language:protected"]=>
array(0) {
}
["error_count:private"]=>
int(0)
["sign_cert_file:private"]=>
string(0) “”
["sign_key_file:private"]=>
string(0) “”
["sign_key_pass:private"]=>
string(0) “”
["exceptions:private"]=>
bool(false)
}
The SMTP debugging output is shown below:
SMTP -> FROM SERVER:220 smtpauth11.prod.mesa1.secureserver.net ESMTP
SMTP -> FROM SERVER: 250-smtpauth11.prod.mesa1.secureserver.net
250-AUTH LOGIN PLAIN
250-8BITMIME
250 PIPELINING
SMTP -> FROM SERVER:250 Sender accepted.
SMTP -> FROM SERVER:250 Recipient accepted.
SMTP -> FROM SERVER:354 End your message with a period.
SMTP -> FROM SERVER:250 Accepted message qp 32177 bytes 621
If you have settings that work and you receive the test email, then this plugin is working correctly. Depending on which contact form you’re using, there may be problems with the form. Personally, I use Grunion Contact Form and it works fine for me.
You are right – your plugin seems to be fine.
I just thought you might be able to help – as thus far – GoDaddy and WordPress – tend to blame each other.
I have used endless different contact forms – the forms certainly are not the problem.
Do you receive comment notifications, password reset emails, and so on? If all email except contact forms are working, then the problem lies with the contact form. If the contact form uses the wp_mail() function to send email, then it should work. But if you’re using a contact form that implements its own mail sending mechanism, the WP Mail SMTP plugin will have no impact.
Yes, I receive all other types of email.
It’s hard to believe it’s the contact form given that i’ve tried so many.
I’ve just done a quick test using the Grunion Contact Form here:
http://www.zorba.com.co/wordpress/contact-2
Again, no email has arrived (I always check the junk mail just in case).
That said, I don’t know whether this, or any of the other contact forms, use the wp_mail() function to send email – all I know is that the plugin is activated on my wordpress dashboard and i’ve tried all the recommend settings.
Grunion does use the wp_mail function. Try the WP Mail Log plugin, it will help you understand what’s going on under the hood.
I’ve activated the plugin.
To be frank, I no nothing about code – so this isn’t much use to me.
To be frank, if you want my help, please be kind, respectful and appreciative in your tone, or find somebody else to help you.
Sorry Callum.
I didn’t mean to be rude.
I just wanted to let you know I’m lost when it comes to code.
Sorry.
Hi Callum,
I’m using a contact form from within a wp template – and it was failing to send mails. I was told this was because I needed to use SMTP rather than the PHP mail.
Someone mentioned your plugin – and it’s almost perfect!
I say almost, as if someone uses speech marks or apostrophes in the subject or body of the message, I get them replaced with \" or similar.
Is this something that I can resolve at your plugin’s level – or is more likely to be something I need to tweak in the template?
Many thanks,
Rob.
Ah, okay – the comments system here stripped that out!
The last bit that read “I get them replaced with…” should have given the example of [ \ & quot ] (without the square brackets or spaces!!).
Thanks.
It’s related to the contact form. This plugin doesn’t affect the subject line in any way. There’s probably an issue somewhere with variables not being unlashed.
Thanks v much Callum – yep, a couple of “stripslashes” in the form’s post routine and all is good.
Much appreciated – and thanks again for a great plugin.
I am sorry to bother you with seemingly stupid questions… I have spent many hours now trying to setup a couple of multi-sites to do testing with your SMTP plugin and I just want some clarification.
Q1: Is the following code the only code needed in the wp-config.php file or do I need to add more than that?
Q2: Do I add all the settings in to the wp-config.php file (for a gmail hosted domain) so set up a multisite global mailer? or is there another place?
define(‘WPMS_ON’, true);
define(‘WPMS_MAIL_FROM’, ‘From Email’);
define(‘WPMS_MAIL_FROM_NAME’, ‘From Name’);
define(‘WPMS_MAILER’, ‘smtp’); // Possible values ‘smtp’, ‘mail’, or ‘sendmail’
define(‘WPMS_SET_RETURN_PATH’, ‘false’); // Sets $phpmailer->Sender if true
define(‘WPMS_SMTP_HOST’, ‘localhost’); // The SMTP mail host
define(‘WPMS_SMTP_PORT’, 25); // The SMTP server port number
define(‘WPMS_SSL’, ”); // Possible values ”, ‘ssl’, ‘tls’ – note TLS is not STARTTLS
define(‘WPMS_SMTP_AUTH’, true); // True turns on SMTP authentication, false turns it off
define(‘WPMS_SMTP_USER’, ‘username’); // SMTP authentication username, only used if WPMS_SMTP_AUTH is true
define(‘WPMS_SMTP_PASS’, ‘password’); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true
Thank you very much for your time.
Yes, if you place all that info in wp-config.php that will configure the plugin for the whole site. It will also disable the admin menu to avoid confusion.
I have a problem =/
Test Message Sent
The result was:
bool(true)
The SMTP debugging output is shown below:
SMTP -> FROM SERVER:
SMTP -> FROM SERVER:
SMTP -> ERROR: EHLO not accepted from server:
SMTP -> FROM SERVER:
SMTP -> ERROR: HELO not accepted from server:
SMTP -> NOTICE:
EOF caught while checking if connectedLanguage string failed to load: tls
Have you chosen to use TLS encryption? Your PHP server might not be configured to allow encrypted connections. But it looks from the “bool(true)” like your message was sent successfully. Does the test message ever arrive?
I keep getting these errors when sending , do you know why?
SMTP -> FROM SERVER:250 2.1.0 Sender OK
SMTP -> FROM SERVER:550 5.7.1 Unable to relay
SMTP -> ERROR: RCPT not accepted from server: 550 5.7.1 Unable to relay
I recommend contacting your mail server administrator. I’d guess that you’re not using authentication (username and password) when you might need to be.