Print Page | Close Window

Mail for Senslight

Printed From: openElement Website
Category:

openElement


Forum Name: Templates
Forum Description: Questions about templates? Sharing a custom template? Post here.
URL: https://forums.openelement.uk/en/forum_posts.asp?TID=1823
Printed Date: Apr 20 2024 at 12:46pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Mail for Senslight
Posted By: WattJet
Subject: Mail for Senslight
Date Posted: Apr 19 2021 at 8:40pm
Hi I am trying to configure the contact form (an item we all know is rarely used...still)

So in project > Preferences > Publishing >>Configuration I introduced:
the email address:          pppp[at]ssss.com
the type of server:         SMTP
the server name smtp:   smtp.XXXXX.com
the port                         465
and I clicked on              SSL

In the email form configuration I included a recipient email address and in the sender address I use the same one chosen in preferences (See above). I chose the three elements of the template to be included, I put the name of the fields for the mail, and the summary shows at the bottom the following

Form elements:              WETextbox2,WETextbox2,WETextArea2
Form button:                  Bt_envoyer(2)

I uploaded it, run it as a normal user from the server and I get the error message below.
So my questions are two:
a) Where is the mistake

b)  Why does the error message  contain so much information? The XXXXX are the hosting service and the name of the account and the YYYYY's are the directory in which the filles are saved. Does this mean that any malfunction will give anyone these data?

Thanks for any guidance

Fatal error: Uncaught Error: Call to undefined function eregi() in /hermes/bosnacweb01/bosnacweb01aa/b1121/XXXXXXXX/YYYYYY/WEFiles/Server/class/class-phpmailer.php:726 Stack trace: #0 /hermes/bosnacweb01/bosnacweb01aa/b1121/XXXXXX/YYYYYYY/WEFiles/Server/class/class-phpmailer.php(651): PHPMailer->SmtpConnect() #1 /hermes/bosnacweb01/bosnacweb01aa/b1121/XXXXXXXX/YYYYYYYYY/WEFiles/Server/class/class-phpmailer.php(417): PHPMailer->SmtpSend('Date: Mon, 19 A...', '--b1_da14669c0e...') #2 /hermes/bosnacweb01/bosnacweb01aa/b1121/XXXXXXX/XXXXXXX/WEFiles/Server/openElement.php(396): PHPMailer->Send() #3 /hermes/bosnacweb01/bosnacweb01aa/b1121/XXXXXXX/XXXXXXX/WEFiles/Server/WESendMail-v210.php(335): OEMail->send() #4 {main} thrown in /hermes/bosnacweb01/bosnacweb01aa/b1121/XXXXXXXXX/YYYYYYY/WEFiles/Server/class/class-phpmailer.php on line 726


Th



Replies:
Posted By: Hobby001
Date Posted: Apr 20 2021 at 1:45am
You have to configure the send by email hidden element

https://wiki.openelement.com/en/index.php?title=Send_Form_by_E-Mail" rel="nofollow - https://wiki.openelement.com/en/index.php?title=Send_Form_by_E-Mail

revert back what you have done with the preferences.  You may need to change smtp for mail


Make sure that php is enable on your host


-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Apr 20 2021 at 10:33pm
Hi Hobby,

I configured the mail in the way the tutorial shows.

I have anothe website, hosted in the same host.  This site that has a mail form that works.
In the preferences of that website, there is no info on the php version. The slot is blank

I checked with the hosting service and the php is on and is set at version 7.3

I have verified the config and it is right (and in both sites is the same)... but still in this new one, it does not work and I get the mentioned error msg


Posted By: Hobby001
Date Posted: Apr 21 2021 at 12:34am
Make sure that the parameters are set to the same as the one that works.

If it does not work delete your site on the host and republish

If it does not work make a backup then go to Project, Preferences, Maintenance, Rebuild pages and ... 

Click Excute, delete the project from the host and republish


-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Apr 21 2021 at 4:46pm
Hi,
I don't know if I should, but everytime I am publishing  I do before the routine: "Project, Preferences, Maintenance, Rebuild pages and ... Click Excute"

More info on this.
I went back to the site that works (made based on sensode black): The contact fields are three, the 2nd being "WEEMAIL" and is intended to be filled with the email address of the person filling the contact form (let's call this person the "Filler")

The configuration is set so that the "sender"  uses the content of this field.  As a result, when the form is filled in, an email is generated  and sent to the recipient address, that includes as sender "Filler" email address. This has -at least for me-  a weird effect, since the email received  appears to be sent by the "Filler" (even with the full headers selected, the sender shows as being the "filler", with no other info)

The "funny" thing is that if "filler" is a non existing email address, then there is an error message generated exactly the same as the one that started this post.

Regarding the new site, I made sure that the configuration is the same as in the other site. I opened a complete new directory in th hosting and  I redirected another domain to it to start from scratch. The problem remains.
I tried substituting the "filler" field (which in the case of senslight is WEd7b345173c with an email address reserved for this purpose (different from the recipient address) and the problem remains.





Posted By: Hobby001
Date Posted: Apr 21 2021 at 7:17pm
The error might be generated by the mail service since the mail policies changed on many of them.  If the sender does not carries an address from the originating domain it is considerred as spam.




-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Apr 21 2021 at 7:29pm
I really do not get how it works.

From the site that works, I filled in the form with 3 different email addresses, hosted in different providers and it worked. Then I tried with an invented address and game me the error. (as per above,  the error message shows the hosting name, the name of the account and the directory in which the site is saved)

This point may or may not be minor, but I'd rather avoid "publishing" the name of the account everytime there is an error in filling the form. Is there any way to correct this and make it show just the message that is built in the routine?




Posted By: Hobby001
Date Posted: Apr 21 2021 at 8:08pm
I have no clue, somehow you did something different with this one and I can't guess what you did.

-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Apr 26 2021 at 8:31pm
Hi again.
I've decided to desist... besides, if someone really wants to contact, they will send an email. Yes, including an email in the site makes it more prone to spam etc, but since the email has to be there in the legal notices, I do not think it will generate much more problems.

So now I have two issues with the site.

a) link mailto: opens the w10 update Mail App and does not recognize/consider the email software by default (I've tried with two PCs, one with Outlook and the other with Thunderbird. In both cases the link opens the Mail app which it then asks you for an account etc. That is quite unconvenient and all the other email links that I used before open the email App by default. Why does OE open W10 Mail? żIs there any way to force it look into your default application?

b) In the original contact (page contact, not the one in the homepage) form there is a grey line below the button "send/envoi". I cannot find the code anywhere to move it to the right

Any guidance will be  welcome
 


Posted By: Hobby001
Date Posted: Apr 26 2021 at 9:20pm
Originally posted by WattJet WattJet wrote:

Hi again.
I've decided to desist... besides, if someone really wants to contact, they will send an email. Yes, including an email in the site makes it more prone to spam etc, but since the email has to be there in the legal notices, I do not think it will generate much more problems.

So now I have two issues with the site.

a) link mailto: opens the w10 update Mail App and does not recognize/consider the email software by default (I've tried with two PCs, one with Outlook and the other with Thunderbird. In both cases the link opens the Mail app which it then asks you for an account etc. That is quite unconvenient and all the other email links that I used before open the email App by default. Why does OE open W10 Mail? żIs there any way to force it look into your default application?


No clue

Originally posted by WattJet WattJet wrote:


b) In the original contact (page contact, not the one in the homepage) form there is a grey line below the button "send/envoi". I cannot find the code anywhere to move it to the right

Any guidance will be  welcome
 

Please give a link


-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: WattJet
Date Posted: Apr 26 2021 at 9:56pm
https://mydatamygain.co.uk/contact.htm
See grey line below


Posted By: Hobby001
Date Posted: Apr 26 2021 at 10:58pm
Find element WE457a6ed2e6

In Style => Customize => CSS3 remove the shadow


-------------
https://denislafrance.net/index.en.php" rel="nofollow - https://denislafrance.net https://www.youtube.com/playlist?list=PLWg7A6YtIr7WE2oJe9pX8_3u0FerqJwjo" rel="nofollow - , OE training video


Posted By: gjw666
Date Posted: May 02 2021 at 6:22pm
The problem that the opening poster is having is with the function eregi in the SMTP script.

This function was DEPRECATED in PHP 5.3.0, and REMOVED in PHP 7.0.0. Alternatives to this function include: preg_match () (with the i (PCRE_CASELESS) modifier).

Not an expert with this kind of stuff, but it sounds like the base code needs an update!


Posted By: gjw666
Date Posted: May 02 2021 at 8:25pm
Looking again in more detail the PHPMailer version that is used in the code is a REALLY old version that has been majorly rewritten to modern standards (adding namespaces, the way the classes are called etc).

Its a reasonably sized rewrite to incorporate the new version of the PHP Mailer in the code and get it all working.

My PHP skills are fairly rudimentary, but if someone in the community would like to tackle it, it would be a cool capability to have!

New version of PHP Mailer is on GitHub:  https://github.com/PHPMailer/PHPMailer#:~:text=PHPMailer%20was%20originally%20written%20in%202001%20by%20Brent,Marcus%20created%20his%20fork%20on%20GitHub%20in%202008." rel="nofollow - GitHub - PHPMailer/PHPMailer: The classic email sending library for PHP




Posted By: WattJet
Date Posted: May 02 2021 at 9:08pm
Thanks for the feedback gjw.

For me is not an issue any longer since I  took out the form, but as you say, maybe it would be worth if the developer.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net