Q: Mail are not sent, why?
A1: Check if all parameters are correct and check if the smtp works in another program like an email client
A2: If you are using SSL/TLS you need a PHP with openSSL support, see requirements
Q: How can I check if I have openSSL support installed on my server?
Create inside your web server a php file with inside this:
<?php phpinfo(); ?>
then visit with your browser that page and check “Registered Stream Socket Transports” and see if you have “tls” and “ssl” protocols.
Q: Why I got duplicates of mails? It’s clearly a Cimy Swift SMTP issue!
A: If the sender and the destination addresses are the same probably you are receiving one mail for the sender and one mail for the destination and you are thinking it’s a duplicate, but it’s not true and it’s not “clearly a Cimy Swift SMTP issue”.
For example GMail always does like that.
Q: When feature XYZ will be added?
A: I don’t know, remember that this is a 100% free project so answer is “When I have time and/or when someone help me with a donation”.
Q: Can I help with a donation?
A: Sure, visit the donation page or contact me via e-mail.
Q1: I have found a bug what can I do?
Q2: Something does not work as expected, why?
A: The first thing is to download the latest version of the plug-in and see if you still have the same issue.
If yes please write me an email or write a comment but give as more details as you can, like:
- Plug-in version
- WordPress version
- MYSQL version
- PHP version
- exact error that is returned (if any)
after describe what you did, what you expected and what instead the plug-in did ![]()
Then the MOST important thing is: DO NOT DISAPPEAR!
A lot of times I cannot reproduce the problem and I need more details, so if you don’t check my answer then 80% of the times bug (if any) will NOT BE FIXED!




123 Responses
1 2 3 Next »
when i try to activate the plugin I’m getting an error msg saying that the plugin has a severe problem and can’t be activated
Hi Opeio,
can you tell more?
Which version of PHP do you have? WordPress?
Does it displayed other error messages apart the one you have reported?
thanx
Hi,
I too get this error!
WordPress version = 2.2
PHP = 4.3.0
Ok I reproduced the problem, it’s only with PHP4, will release a fix soon.
EDIT:
Fixed
Plugin activated fine, test email failed.
Port 465/TCP incoming/outgoing is open, iptables -L shows this. I’m using PHP5.2 with OpenSSL enabled. The raw openssl command establishes a connection to gmail’s smtp server without a problem.. PHP just has a difficult time…
Fatal error: Uncaught exception ‘Swift_Connection_Exception’ with message ‘The SMTP connection failed to start [smtp.gmail.com:0]: fsockopen returned Error Number 0 and Error String ‘Failed to parse address “smtp.gmail.com”” in /http/content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift/Connection/SMTP.php:293 Stack trace: #0 /http/content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift.php(225): Swift_Connection_SMTP->start() #1 /http/content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift.php(102): Swift->connect() #2 /http/content/plugins/Cimy_Swift_SMTP/swift_engine.php(43): Swift->__construct(Object(Swift_Connection_SMTP)) #3 /http/content/plugins/Cimy_Swift_SMTP/cimy_swift_smtp.php(179): wp_mail(‘j0wned@comcast….’, ‘Cimy Swift SMTP…’, ‘This is a test …’) #4 [internal function]: st_smtp_options_page(”) #5 /http/includes/plugin.php(160): call_user_func_array(‘st_smtp_options…’, Array) #6 /us in /http/content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift/Connection/SMTP.php on line 293
Patterson:
I reproduced the problem, I will try to fix it, thanx for reporting it.
How did you reproduce the problem? Using my ISP’s smtp servers via plain text (port 25) also fails.. Any ideas/clues as to what might cause this??
Patterson:
I reproduced the problem with my gmail account’ smtp but with my ISP’ smtp that doesn’t require authorization it’s ok, so probably it’s a bug with authorization.
Man, I thought I was crazy! I’ve been trying to correct this for days, but none of the errors I receive turn up in google. I do wonder why my ISP’s smtp doesn’t work though.. Swift for wordpress gives pretty much the same error mentioned above.
Patterson:
ok I found the problem, this time is PHP5 that has the problem, PHP4 I think not, anyway a fix will be out for sunday.
In the meanwhile I sent to your mail the fix to test, let me know.
thanx
Mr. Cimmino,
Thanks so much for the email. Your response was quicker than I expected, but unfortunately, the provided files still didn’t work. I pasted the error below. As mentioned before, even if I use my ISP’s (comcast) smtp servers on port 25, the connection still fails. I’ve even tested by completely removing my firwall policy.. This is so frustration, but I do appreciate your efforts. This is a debian linux virtual private server. I’m in the process of moving away from Coldfusion (my primary dev environment of choice) to PHP, and it hasn’t been fun… An error indicating improper credentials would prove success, but PHP isn’t even establishing a connection. I’ll send you a screenshot of the options screen. Thanks for all your help!
Fatal error: Uncaught exception ‘Swift_Connection_Exception’ with message ‘The SMTP connection failed to start [tls://smtp.gmail.com:465]: fsockopen returned Error Number 0 and Error String ”’ in /http/content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift/Connection/SMTP.php:293 Stack trace: #0 /http/content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift.php(225): Swift_Connection_SMTP->start() #1 /http/content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift.php(102): Swift->connect() #2 /http/content/plugins/Cimy_Swift_SMTP/swift_engine.php(60): Swift->__construct(Object(Swift_Connection_SMTP)) #3 /http/content/plugins/Cimy_Swift_SMTP/cimy_swift_smtp.php(166): wp_mail(‘j0wned@comcast….’, ‘Cimy Swift SMTP…’, ‘This is a test …’) #4 [internal function]: st_smtp_options_page(”) #5 /http/includes/plugin.php(160): call_user_func_array(‘st_smtp_options…’, Array) #6 /http/admin/ad in /http/content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift/Connection/SMTP.php on line 293
Grazie, Marco! Emailing from within WordPress had disappeared for some strange reason, and your plug-in gave me the flexibility to set it up again.
I have experienced the same error as Patterson dice did. Most weird is that it worked fine when I first installed it. And now, it stopped working for the errors. So I suspected some conflicting plugin caused it?
I am having the same problem as Patterson. I’d appreciate getting the fix when you figure it out.
Henry and Justin:
I need of course more infos like:
- WP version
- PHP version
- Exact error
- Plug-in version, have you tried latest one? if yes have you tried older one? Results?
Thanx
Hi,
i’m encountering the error also.
Here’s the error log
Uncaught Error of type [Swift_Connection_Exception] with message [The SMTP connection failed to start [tls://smtp.gmail.com:465]: fsockopen returned Error Number 8 and Error String ‘Unable to find the socket transport “tls” – did you forget to enable it when you configured PHP?’]
@0 require_once() in /home/alvinlim/public_html/wp-admin/options-general.php on line 2
@1 do_action() in /home/alvinlim/public_html/wp-admin/admin.php on line 51
@2 call_user_func_array() in /home/alvinlim/public_html/wp-includes/plugin.php on line 160
@3 st_smtp_options_page() in on line
@4 wp_mail() in /home/alvinlim/public_html/wp-content/plugins/swift-smtp/shiftthis-smtp.php on line 92
my wp version 2.2.2
plugin ver – 1.0…this is the latest 1 i can get. didn’t try the older version
php version….erm…. not very sure. 4.*?
Alvin:
1) you have to report exact version of the plug-in, they start all with 1.0 so I need the rest
2) you have to report exact version of PHP
3) Can you please do a phpinfo(); to see your php configuration? You should have as “Registered Stream Socket Transports” the “tls” and “ssl” protocols, if not then your php configuration obviously cannot understand address like “tls://smtp.gmail.com:465″
Hi,
thanks for responding so fast.
My PHP version is 5.2.3.
This is taken from the plugin
/*
Plugin Name: ShiftThis.net | Swift SMTP
Plugin URI: http://www.shiftthis.net/wordpress-swift-smtp-plugin/
Description: Send email via SMTP (Compatible with GMAIL)
Author: Marcus Vanstone
Version: 1.0
Author URI: http://www.shiftthis.net
CHANGELOG
June 11, 2007 – Updated to Swift v3.2.5, WordPress MU compatible, WordPress 2.2 Compatible, removed all PHP shorthand tags
Jan 28, 2007 – Fixed outdated use of $user_level variable with WordPress 2.1 compatible current_user_can() function.
Dec 17, 2006 – Fixed “Cannot redeclare class swift” Error.
Oct 29, 2006 – Fixed compatibility issue with ShiftThis Newsletter Plugin. Added connection test to Options page.
*/
i’m actually using CPanel…and i know nuts about PHP. Not sure if i can try the phpinfo() thing with Cpanel
Thanks in advance
Alvin:
ATTENTION: you are using the plug-in where mine is based, but they are different!
Download my plug-in: Cimy Swift SMTP v1.0-cimy0.3.0 from the main page and as written by you I’m Marco Cimmino not Marcus Vanstone and as you can see homepages are totally different.
If you want support for my plug-ins then install them, I cannot give support for others.
To do a phpinfo(); just put in a php file under your web server with this code and visit it.
Hi Marco,
I’m using your plugin now and after checking phpinfo(), it seems like my server does not have SSL/TLS opened at “Registered Stream Socket Transports”. I’ve emailed the hosting company, asking them how can i do that.
i tried to use my default smtp 25, given by the hosting company and i get this error.
Fatal error: Uncaught exception ‘Swift_Connection_Exception’ with message ‘The SMTP connection failed to start [smtp.alvinlim.info:25]: fsockopen returned Error Number 16650014 and Error String ”’ in /home/alvinlim/public_html/wp-content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift/Connection/SMTP.php:293 Stack trace: #0 /home/alvinlim/public_html/wp-content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift.php(225): Swift_Connection_SMTP->start() #1 /home/alvinlim/public_html/wp-content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift.php(102): Swift->connect() #2 /home/alvinlim/public_html/wp-content/plugins/Cimy_Swift_SMTP/swift_engine.php(60): Swift->__construct(Object(Swift_Connection_SMTP)) #3 /home/alvinlim/public_html/wp-content/plugins/Cimy_Swift_SMTP/cimy_swift_smtp.php(166): wp_mail(‘alvlim1982@gmai…’, ‘Cimy Swift SMTP…’, ‘This is a test …’) #4 [internal function]: st_smtp_options_page(”) #5 /home/alvinlim/public_html/wp-includes/plugin.php(160): call_user_func_array(‘st_smtp_options…’, Array) #6 /home/alvinli in /home/alvinlim/public_html/wp-content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift/Connection/SMTP.php on line 293
Alvin:
ok so probably for the first problem it’s a php configuration problem not a plug-in bug.
For the second try with smtp.alvinlim.info:25
1) are you sure that it works?
2) have you ever tried with another program and it worked?
3) it’s an smtp without authentication?
I just delete the plugin files from my ftp and re-transfer the plugin and activate it. Guess what? It works fine now again. Still don’t know why. But I suspect the plugin was messed up during some of my operations. Thanks!
My PHP version: 5.2.3
WordPress:2.2.2
Exact error as Patterson’s.
Plugin version: latest 1.0
Marco,
I haven’t use the smtp before…this is my first time. Any other programs which i can use to test it? I’m on a shared server…thus not being able to get the TLS / 465. I’ll have to make do with port 25.
Please help.
Thanks in advance.
Marco, i got it working for my SMTP. Thanks ya. The hosting company gave me the wrong SMTP to use.
Thanks for this, which is working nicely for me – unlike the ShiftThis version which will not work with port 25 on a separate server, because if port 25 is entered it defaults to “localhost”.
The problem is that I am getting double copies of my backups, generated by WordPress Database Backup 2.1.3. This is annoying because one of the backups is already over 1 MB when base64 encoded, and the double copy is over 2 MB. This was not happening with mail() (now disabled by my host), nor with WP-Mail-SMTP 0.3.2, so it is clearly an issue with Cimy Swift SMTP.
Here are the relevant parts of the mail header, showing why I am getting double copies of the attachment:
Peter Kirk:
> so it is clearly an issue with Cimy Swift SMTP
I’m happy that you are so sure, because I’m not!
Consider that this is just a rewrite of the wp_mail function that should be used by WordPress and plug-ins, so if all others calls send 1 mail and that plug-in’s call send 2 what do you think?
Consider also that if you are using gmail probably gmail itself send to the destination one mail and to the sender one mail, if they are the same address you think they are duplicates but they are not!
@Marco Cimmino
Correct me if I’m wrong here, I’m assuming that this plugin overwrites the default mail function in wordpress core and The e-mail address in the Options->General is not used if I install this plugin?
Is this compatible with “WordPress Database Backup” or “WP Ajax Newsletter”?
Thanks!
peps:
it’s a wrapper, it doesn’t “overwrite” anything technically, but it’s used instead of the original one and it has its own options yes.
don’t know for compatibility, just try and report here.
thanx
Ok, thanks for the clarification.
on WP Ajax Newsletter, I have to modify some of the lines for the correct traversing of the From: in the header. Same with WordPress Database Backup.
Oops, had a problem with WP-DB backup. This is in the error logs:
[error] [client 127.0.0.1] PHP Fatal error: Uncaught exception ‘Swift_FileException’ with message ‘Unable to open file ‘\\Apache Group\\Apache2.2\\htdocs\\wp-content/backup-e4bd2/ for reading. Check the file permissions.’ in \\Apache Group\\Apache2.2\\htdocs\\wp-content\\plugins\\Cimy_Swift_SMTP\\Swift\\php5\\lib\\Swift\\File.php:103\nStack trace:\n#0 Apache Group\\Apache2.2\\htdocs\\wp-content\\plugins\\Cimy_Swift_SMTP\\Swift\\php5\\lib\\Swift\\File.php(170): Swift_File->createHandle()\n#1 \\Apache Group\\Apache2.2\\htdocs\\wp-content\\plugins\\Cimy_Swift_SMTP\\Swift\\php5\\lib\\Swift\\Message\\Encoder.php(160): Swift_File->read(8190)\n#2 \\Apache Group\\Apache2.2\\htdocs\\wp-content\\plugins\\Cimy_Swift_SMTP\\Swift\\php5\\lib\\Swift\\Message\\Mime.php(327): Swift_Message_Encoder->base64EncodeFile(Object(Swift_File), 76, ‘??’)\n#3 \\Apache Group\\Apache2.2\\htdocs\\wp-content\\plugins\\Cimy_Swift_SMTP\\Swift\\php5\\lib\\Swift\\Message\\Mime.php(484): Swift_Message_Mime->buildData()\n#4 \\Apache Group\\Apache2.2\\htdocs\\wp-content\\plugins\\Cimy in \\Apache Group\\Apache2.2\\htdocs\\wp-content\\plugins\\Cimy_Swift_SMTP\\Swift\\php5\\lib\\Swift\\File.php on line 103, referer: http://127.0.0.1/wp-admin/edit.php?page=wp-db-backup
Ok, I found that on the /* CHECK FOR ATTACHMENT */ part, the variable that nl2br($content) executes has the wrong content ($content at this point is overwritten in the // Cleanup crew part), instead I made a temporary variable of the original $content and replaced it in the nl2br.
Ok, I have a question…Does Cimy Swift support multipart/mixed Content-Type? Can it parse the message body and place the boundary on every part? Thanks!
The test emails are successful for me, but when someone comments on my posts, it doesn’t notify me via this plugin as I thought it would.
I used the original plugin and it worked until I upgraded to 2.3.2, now it doesn’t work.
Any ideas? Thanks for your help!
Shane:
tested with WordPress 2.3.2 and it works, checked the spam folder?
You’re right! The problem was with the gmail account I had set up. Thanks for filling me in Marco!
Good day, I am using the swift-smtp in conjunction with Naatan.com Notify Me. I have successfully used the plugin to send mail, however, when someone subcribes on the NotifyMe page, I get the below error.
Notice: The recipients parameter must either be a valid string email address, an instance of Swift_RecipientList or an instance of Swift_Address. in /public_html/acositrep/wp-content/plugins/swift-smtp/Swift/lib/Swift.php on line 392
Tim:
the plug-in isn’t tested with other plug-ins, so might have more than one problem.
For now I haven’t so much time to look at it, sorry.
Any idea why I might be getting this error message when I write a post?
“Message failed to send to [cut] from Object
Warning: Cannot modify header information – headers already sent by (output started at /home/u13bill/public_html/wp-content/plugins/Cimy_Swift_SMTP/swift_engine.php:204) in /home/u13bill/public_html/wp-includes/pluggable.php on line 689″
I have no experience with php and no idea how to make this work!
Michael:
the plugin is trying to write “Message failed to send [..]” and this is not always possible.
Anyway there is something in settings that you have to modify.
Try to use test mail first.
Thanks for the reply. When I test the settings the email sends correctly.
I neglected to mention that I am using this with the plugin Subscribe2 – perhaps it is a problem with that plugin and I will check on that now. Please delete the email address from the above post if possible?
Michael:
try to disable that plugin and see if then it works.
Following up on Michael’s bug report: I’m using Subscribe2 as well. When I publish a post, the Subscribe2 plugin attempts to send email to all subscribers and gets the error Michael mentioned if I have not turned on the “Always overwrite the sender” option in Cimy Swift SMTP.
So I suspect the problem lies somewhere in the interaction of Subscribe2 with the parsing code in swift_engine.php that sets the From: address when it’s specified by the caller of wp_mail… any suggestions on how I can help debug this?
More investigation… I think I found two bugs in swift_engine.php. When you send an email with a Bcc: header OR the “Always overwrite the sender option” is off in Cimy Swift SMTP, it tickles these bugs.
First, in line 92, $headers is being reinitialized for no good reason. This causes problems in the batch/bcc code further down.
Secondly, even if that line is commented out, the batch/bcc code is broken. It blindly walks through the entire $headers string, assuming that every line is a Bcc: header. This results in nonsense entries in the bcc array; changing line 176 to check for a Bcc: string fixes this bug.
Even after tweaking these lines, however, I am still experiencing the bug described in my previous comment… something’s still broken in the bcc code, I suspect…
Eric:
thanx for your detailed investigation, then I will try to get into it next week hopefully.
Fatal error: Uncaught exception ‘Swift_ConnectionException’ with message ‘The SMTP connection failed to start [localhost:25]: fsockopen returned Error Number 111 and Error String ‘Connection refused” in /home/philipe/www/blog/wp-content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift/Connection/SMTP.php:309
Stack trace:
#0 /home/philipe/www/blog/wp-content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift.php(216): Swift_Connection_SMTP->start()
#1 /home/philipe/www/blog/wp-content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift.php(101): Swift->connect()
#2 /home/philipe/www/blog/wp-content/plugins/Cimy_Swift_SMTP/swift_engine.php(69): Swift->__construct(Object(Swift_Connection_SMTP))
#3 /home/philipe/www/blog/wp-includes/pluggable.php(932): wp_mail(‘phda81@gmail.co…’, ‘[Philipe Montei...', 'New user regist...')
#4 /home/philipe/www/blog/wp-login.php(185): wp_new_user_notification(9, [snip])
#5 /home/philipe/www/blog/wp-login.php(304): register_new_user(‘philipe’, ‘philipe@hostnet…’)
#6 {main} thrown in /home/philipe/www/blog/wp-content/plugins/Cimy_Swift_SMTP/Swift/php5/lib/Swift/Connection/SMTP.php on line 309
My BLog http://www.philipecardoso.com
Philipe:
first of all pay attention, you posted an url to your blog and a username and valid hash password to enter into… I replaced password with [snip] but hey… it’s your security!
Second:
can you please mention which option used? How can I understand without details? Read the FAQ?
thanks for advise
The problem was fixed
[...] Cimy Swift is for those who have a hosted installation of WordPress where the php mail function disabled and would like to use their SMTP servers. [...]
[...] Cimy Swift is for those who have a hosted installation of WordPress where the php mail function disabled and would like to use their SMTP servers. [...]
THANK YOU!!!
Its been 8 hours and i finaly have found a script that works!
1 2 3 Next »
Leave a Comment