Posts: 3
Threads: 2
Joined: May 2010
Reputation:
0
My web host recently required a PHP upgrade. I have been running Form Tools for 10 years and have not had any trouble sending confirmation emails running PHP 5.3.x and the regular PHPMail setup. All Form Tools elements are at the latest versions and I have run the system check with no errors.
After an update to PHP 5.5 the emails are no longer being received even though the mail log says that they are going out. I was able to roll back to PHP 5.4.x, but that did not help. I also tried using Swift Mailer but all the email server settings i tried gave me a 110 timeout error.
Any ideas?
Thanks,
Robert
Digital Arts
Posts: 2
Threads: 0
Joined: Jul 2015
Reputation:
0
Signal boost since I've recently starting having the same problems, too.
I've been working with Form Tools for quite a few years but only within the past year installed it on my own server. Everything was all well and good until the past week emails from form submissions stopped going through. About 2 weeks ago I did create another form for a client and was testing on that and everything was working just fine, hence why I know this is a recent phenomenon.
Here's what I've tried but so far no luck:
-Tried disabling Swift Mailer. Still can't send test emails from the form itself.
-Enabled Swift Mailer again, started getting a timed out error when running a test.
-Changed the time out error to 2 minutes, because hey let's try everything. Still not working.
-Tried different authentication settings to my server to see if I get a different error, but it's still just a timed out error.
-I haven't upgraded my PHP, I'm still on version 5.4.42.
Realized under the module screen that it claims to be Swift Mailer version 1.1.2, but on the documentation site it says the current version is 5.4.1. So not sure if maybe Swift Mailer just needs an upgrade? But can't figure out a (at least very noticeable) way to upgrade wihtout fear of crashing all of Form Tools.
Posts: 11
Threads: 4
Joined: Nov 2011
Reputation:
0
I'm having the same problem with all of my websites that run Formtools. Has anyone figured out what is going on?
Posts: 11
Threads: 4
Joined: Nov 2011
Reputation:
0
After a little experimenting I'd like to add some more insight into this problem.
1. My problem started after rebuilding my server, but I didn't upgrade PHP. I'm still running PHP Version 5.4.42.
2. I discovered that websites running Formtools with Swiftmailer enabled and set up are sending emails just fine, but websites running Formtools without Swiftmailer enabled -- that is, running mail() have stopped sending emails.
3. I tested mail() independent from Formtools and it's working properly.
4. All sites are either running Formtools 2.2.5 or 2.2.6. Because the only site that is working correctly is running FT 2.2.5, I don't believe this is a version issue.
Posts: 11
Threads: 4
Joined: Nov 2011
Reputation:
0
Jul 30th, 2015, 9:09 AM
(This post was last modified: Jul 30th, 2015, 9:11 AM by fingerprn.)
More experimenting:
1. Tried new installation of FT and ran system check. Other than some orphans, to problems.
2. Added code to /global/code.emails.php to throw error on mail() line to confirm problem originates there. It does.
3. Tried adding -f parameter to /global/code.emails.php on mail() line. No difference.
4. Ran a lot of tests on mail() to see if something is set up incorrectly. Seems to work fine outside of FT, including without the -f parameter.
At this point I'm just going to run the Swift Mailer module since it seems to work fine. For any newbies reading this, be sure and add your SMTP info to Swift Mailer to get it to work. Office365 SMTP settings do not appear to work, but more experimenting may prove otherwise.
Robsedor, I think you just didn't have your SMTP setting quite right on Swift Mailer. For example, I couldn't get the Office365 mail server to work, but my server's email settings worked fine.
Ganymedeskies, unless your SMTP settings are off on Swift Mailer, also, I'm not sure why you're having that problem.
Posts: 5
Threads: 1
Joined: Jan 2015
Reputation:
0
I am having the same problem. I came back from vacation and it is not sending emails. I changed nothing, have not talked to go daddy yet about any changes they may have made.
Can some one explain what swift mailer is and what I should do to set that up?
Newbie Lou
Posts: 5
Threads: 1
Joined: Jan 2015
Reputation:
0
I was able to find swift mailer and get it configured. Now my form is working just fine...
Still no idea what happened while I was away...
Lou
Posts: 339
Threads: 42
Joined: Apr 2010
Reputation:
2
Other than this email error, did you run in to any problems after upgrading to PHP 5.5? I am about to upgrade a few servers to 5.5.. just looking to see if anyone has had any issues in the process :-)
Alex
(Jul 18th, 2015, 10:36 AM)robsedor Wrote: My web host recently required a PHP upgrade. I have been running Form Tools for 10 years and have not had any trouble sending confirmation emails running PHP 5.3.x and the regular PHPMail setup. All Form Tools elements are at the latest versions and I have run the system check with no errors.
After an update to PHP 5.5 the emails are no longer being received even though the mail log says that they are going out. I was able to roll back to PHP 5.4.x, but that did not help. I also tried using Swift Mailer but all the email server settings i tried gave me a 110 timeout error.
Any ideas?
Thanks,
Robert
Digital Arts
Posts: 5
Threads: 1
Joined: Apr 2012
Reputation:
0
I had facing similar issue after upgrading to PHP 5.5.26.
You'll find more information on http://stackoverflow.com/questions/30887...nal-header, but in a nutshell:
* since PHP 5.5.26 mail function does not accept message (i.e. mail body) in headers anymore.
* Mail body has to to be provided as mail $message parameter , even if multipart.
It has been fixed with the following code. Edit global/code/emails.php :
Code: Index: emails.php
===================================================================
--- emails.php (revision 3253)
+++ emails.php (working copy)
@@ -319,8 +319,16 @@
// stores the content for either text or HTML emails (but not both!)
$message = "";
- if (!empty($email_info["html_content"]) && !empty($email_info["text_content"]))
- $headers .= _ft_get_multipart_message($email_info["html_content"], $email_info["text_content"], $eol);
+ if (!empty($email_info["html_content"]) && !empty($email_info["text_content"])) {
+ // Since PHP 5.5.25, mail body can't be put in message headers anymore.
+ // So it is put in the mail parameter $message, even if it's multipart.
+ $multipart_message = _ft_get_multipart_message($email_info["html_content"], $email_info["text_content"], $eol);
+ // Get first line corresponding to the content-type and defining the boundary, and add it to the headers.
+ $tok = strtok($multipart_message, $eol);
+ $headers .= $tok . $eol;
+ // Then get the mail body (multipart encoded) and add it to the message.
+ $message = preg_replace('~' . $tok . $eol . '~i', '', $multipart_message);
+ }
else if (!empty($email_info["text_content"]))
{
$headers .= "Content-type: text/plain; charset=UTF-8";
Hope it helps !
Alexandre 8)
Posts: 339
Threads: 42
Joined: Apr 2010
Reputation:
2
Thanks for the info! I just upgraded my PHP version today and am getting an error when sending a test email via Swift Mailer: "There was a problem communicating with SMTP: The SMTP connection failed to start [ssl://my.[domain].com:465]: fsockopen returned Error Number 0 and Error String ''
I tried editing the code you provided, but I got a little confused. Can you post the entire emails.php file?
Alex
(Aug 19th, 2015, 2:17 AM)alexboss Wrote: I had facing similar issue after upgrading to PHP 5.5.26.
You'll find more information on http://stackoverflow.com/questions/30887...nal-header, but in a nutshell:
* since PHP 5.5.26 mail function does not accept message (i.e. mail body) in headers anymore.
* Mail body has to to be provided as mail $message parameter , even if multipart.
It has been fixed with the following code. Edit global/code/emails.php :
Code: Index: emails.php
===================================================================
--- emails.php (revision 3253)
+++ emails.php (working copy)
@@ -319,8 +319,16 @@
// stores the content for either text or HTML emails (but not both!)
$message = "";
- if (!empty($email_info["html_content"]) && !empty($email_info["text_content"]))
- $headers .= _ft_get_multipart_message($email_info["html_content"], $email_info["text_content"], $eol);
+ if (!empty($email_info["html_content"]) && !empty($email_info["text_content"])) {
+ // Since PHP 5.5.25, mail body can't be put in message headers anymore.
+ // So it is put in the mail parameter $message, even if it's multipart.
+ $multipart_message = _ft_get_multipart_message($email_info["html_content"], $email_info["text_content"], $eol);
+ // Get first line corresponding to the content-type and defining the boundary, and add it to the headers.
+ $tok = strtok($multipart_message, $eol);
+ $headers .= $tok . $eol;
+ // Then get the mail body (multipart encoded) and add it to the message.
+ $message = preg_replace('~' . $tok . $eol . '~i', '', $multipart_message);
+ }
else if (!empty($email_info["text_content"]))
{
$headers .= "Content-type: text/plain; charset=UTF-8";
Hope it helps !
Alexandre 8)
|