PHP 5 vs PHP 7 using mail function
Posted: Fri Sep 07, 2018 4:52 pm
Hai Pablo,
here is a question. When setting the website using PHP5 and sending a email with the default settings when using a form everything is going well. So far so good. When changing the PHP version to PHP 7 i receive an error mail telling me : malformed address: "emailadres" may not follow "emailadres" where "emailadres" is a existing emailadres offcourse.
I looked at the difference between the published pages and found a different line.
PHP5 : mail($mailto, $subject, $body, $header);
PHP7 : mail("{$mailto} <{$mailto}>", $subject, $body, $header, '-f'.$mailfrom);
Removing the <{$mailto}> did the trick only after exporting again it's back offcourse.
Is there a way to solve this or is it a bug or something the website side has to agree with. The php version on the website is 7
Thanks for your time and keep up the good work. I really like the program.
Rob
here is a question. When setting the website using PHP5 and sending a email with the default settings when using a form everything is going well. So far so good. When changing the PHP version to PHP 7 i receive an error mail telling me : malformed address: "emailadres" may not follow "emailadres" where "emailadres" is a existing emailadres offcourse.
I looked at the difference between the published pages and found a different line.
PHP5 : mail($mailto, $subject, $body, $header);
PHP7 : mail("{$mailto} <{$mailto}>", $subject, $body, $header, '-f'.$mailfrom);
Removing the <{$mailto}> did the trick only after exporting again it's back offcourse.
Is there a way to solve this or is it a bug or something the website side has to agree with. The php version on the website is 7
Thanks for your time and keep up the good work. I really like the program.
Rob