Sending email, not html encoded properly |
Post Reply |
Author | ||
cylon4
Newbie Joined: Jun 01 2017 Status: Offline Points: 12 |
Post Options
Thanks(0)
Posted: Jun 01 2017 at 12:28pm |
|
Need a little help. I have the email form sending email, however the messages come through plain-text with all the html raw in the message. The resulting email contains the text "Content-Type:..." etc.
I have php 7 installed on Windows Server 2012 R2, which is the host for the website. The email server is Exchange 2013. The "outgoing email configuration" is set to "mail". I'm pretty sure I just need to configure something in php.ini, but I haven't been able to find it. Can anyone give me a hint? Edited by cylon4 - Jun 01 2017 at 1:15pm |
||
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(0)
|
|
Hi,
I'm not sure it's PHP settings, did you check whether your email server works correctly? |
||
cylon4
Newbie Joined: Jun 01 2017 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
|
Yes, our Exchange servers have been in production for years, are used 24x7, and are working perfectly.
|
||
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(0)
|
|
There's no way you can use SMTP in your case?
|
||
cylon4
Newbie Joined: Jun 01 2017 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
|
Actually I would prefer to use SMTP, but I haven't been able to get it to work.
I'm running php 7.1. Fatal error: Uncaught Error: Call to undefined function eregi() in C:\inetpub\test\WEFiles\Server\class\class-phpmailer.php:726 Stack trace: #0 C:\inetpub\test\WEFiles\Server\class\class-phpmailer.php(651): PHPMailer->SmtpConnect() That line is: if(eregi('^(.+):([0-9]+)$', $hosts[$index], $hostinfo)) { |
||
cylon4
Newbie Joined: Jun 01 2017 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
|
I downgraded to php 5.3 and got it to work.
Thanks! |
||
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(0)
|
|
Hm I thought I've fixed PHP7 compatibility, but this place is called when the connection is not established at first, to make several additional attempts. So the question is, why it didn't connect in the first place. Maybe some SMTP parameters are wrong.
You can try to replace the code in all "class-phpmailer.php" (especially in your published version)
by
|
||
cylon4
Newbie Joined: Jun 01 2017 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
|
That worked, but every time I open the project it gets set back to "eregi" function.
Do you have a suggestion to make it "stick"? |
||
cylon4
Newbie Joined: Jun 01 2017 Status: Offline Points: 12 |
Post Options
Thanks(0)
|
|
I found the source in the program folder and changed it there. Working now.
|
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |