BullGuard Antivirus Sale - 60% Off with openElement !
Forum Home Forum Home >

openElement

> openElement General Discussion
  New Posts New Posts RSS Feed - Sending email, not html encoded properly
  FAQ FAQ  Forum Search   Register Register  Login Login

Sending email, not html encoded properly

 Post Reply Post Reply
Author
Message
cylon4 View Drop Down
Newbie
Newbie
Avatar

Joined: Jun 01 2017
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote cylon4 Quote  Post ReplyReply Direct Link To This Post Topic: Sending email, not html encoded properly
    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
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Jun 01 2017 at 4:54pm
Hi,

I'm not sure it's PHP settings, did you check whether your email server works correctly?
Back to Top
cylon4 View Drop Down
Newbie
Newbie
Avatar

Joined: Jun 01 2017
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote cylon4 Quote  Post ReplyReply Direct Link To This Post Posted: Jun 01 2017 at 5:24pm
Yes, our Exchange servers have been in production for years, are used 24x7, and are working perfectly.
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Jun 01 2017 at 9:15pm
There's no way you can use SMTP in your case?
Back to Top
cylon4 View Drop Down
Newbie
Newbie
Avatar

Joined: Jun 01 2017
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote cylon4 Quote  Post ReplyReply Direct Link To This Post Posted: Jun 01 2017 at 11:23pm
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)) {
Back to Top
cylon4 View Drop Down
Newbie
Newbie
Avatar

Joined: Jun 01 2017
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote cylon4 Quote  Post ReplyReply Direct Link To This Post Posted: Jun 01 2017 at 11:46pm
I downgraded to php 5.3 and got it to work.

Thanks!
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Jun 01 2017 at 11:49pm
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)


eregi('^(.+):([0-9]+)$', $hosts[$index], $hostinfo)


by


preg_match('/^(.+):([0-9]+)$/i', $hosts[$index], $hostinfo)


Back to Top
cylon4 View Drop Down
Newbie
Newbie
Avatar

Joined: Jun 01 2017
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote cylon4 Quote  Post ReplyReply Direct Link To This Post Posted: Jun 13 2017 at 3:05pm
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"?
Back to Top
cylon4 View Drop Down
Newbie
Newbie
Avatar

Joined: Jun 01 2017
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote cylon4 Quote  Post ReplyReply Direct Link To This Post Posted: Jun 13 2017 at 3:11pm
I found the source in the program folder and changed it there.  Working now.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.