Please note that the forum isn't realy used anymore.

If you have questions, want support or just simply want to talk to us you can find us on slack.

 

PHP Mail function stopped working

Hi,

An old client of mine with versie 3.6.5 is having problems with the mailforms. The PHP function stopped working. Did I missed something? Anyone else is having this problem?

Thnx Bas

Does he get any errors? I also have a website running on 3.6.5 and I already received some formbuilder e-mails today so it's working here. I just did another "testmail", sent from the forkcms settings page and I received them just fine...

Maybe ask the hosting if they changed anything related to phpmail? The phpmail settings can be configured in the php.ini file on the hosting servers

The only error I get is the red message if I do a "testmail" but if I send a mail via the form I get a succes message. I also tested the smtp function. Same problem.

I already asked the webhost but nothing is changed and they did a test with an other PHP mail function script without any problems.

Hmm I don't have a clue. Maybe try to create a small script with Spoon mail? This is the library that your version of fork cms is using to send e-mails.

PS. Starting from Fork CMS 3.9, they switched to Swiftmailer

I found this error in the logs; mail(): Multiple or malformed newlines found in additionalheader in /home/frasen1q/publichtml/vendor/spoon/library/spoon/email/email.php on line 724

And this one: {"code":500,"data":null,"message":"HELO went wrong: SMTP code 220"}

Does this ring any bells what i could be?

Seems like a php issue according to Google/Stackoverflow, introduced when the hosting probably did a minor upgrade from PHP 5.5.x to PHP 5.5.26 or higher...

Problem is that Spoon Library isn't very active anymore (and Fork moved on to Swiftmailer to handle mails, and uses Symfony components for the other stuff so Spoon can be removed in the future), so reporting this as a Spoon Library issue on github won't get it fixed very fast.

Maybe you can ask the hosting to switch to a different PHP version? Most shared hostings allow to choose your PHP version. Try PHP 5.4 maybe?

Is it possible to switch to Swiftmailer for older installations of Fork-CMS? Spoon only works on PHP 5.3. I unfortunately don't know where to start when I want to switch to Swiftmailer.

I fixed the problem by switching to SMTP in the settings/email

Comment

The forum is deprecated in favor of our Slack channel, which provides real-time support for your issues.

Join us on Slack here: https://fork-cms.herokuapp.com/