novafacile / bludit-plugins

Plugins for Bludit CMS - https://bludit-plugins.com | Contact3 - the contact form for Bludit CMS | ImageGallery - the image gallery for Bludit CMS | Online Store Plugin für Bludit
https://bludit-plugins.com
MIT License
16 stars 5 forks source link

Help with new contact #14

Closed BlakesHeaven closed 5 years ago

BlakesHeaven commented 5 years ago

Hi, I've had six v1.2.0 contact pages for a while now and they work fine. I have just added another and get Oops! An error occurred while sending your message, thank you to try again later. Can you suggest what might be wrong and how I can find out why it is saying this as I've done nothing different from any of the others?

This is at the end of trying lots of things, in dev environments, in subdirectories and subdomains, trying it on Bludit3.9.1 and eventually coming back to the Live environment where I at least have some working pages. same is true in both Firefox and Ie browsers. I don't have SMTP set up. The once working also have Captcha enabled, but I've left the new test one without. The Live environment where the first six work is Bludit 3.7.0.

Any suggestions would be appreciated because it just does not make any sense.

One enhancement you might consider is to write log entries to the content\workspace\contact3 folder with a setting to capture Error &/or Info messages.

Thanks.

BlakesHeaven commented 5 years ago

Update. Comparing the other working instances I have compared the contents of each file, the folder permissions and the file permissions - all are identical other than the slightly changed plugin name (consistent with all working instances).

This is really frustrating and wish the error indicated where in what file or what bit of code it's failing.

I'm going to start adding echo statements to find where it gets to.

david-novafacile commented 5 years ago

Hello,

sorry for the late reply!

Normally you can see the error messages in the php order server error log file. Do you have access to them? On some webhostings you can set this via .htaccess (https://stackoverflow.com/a/16375310).

Is the server environment an other environment, than the other bludit setups?

My first idea is, that the php mail setup isn't correct or the email setup on the webserver isn't correct.

Did you try with smtp setup?

BlakesHeaven commented 5 years ago

Thanks for the reply - I only have the option in my hosting control to turn php logs on/off, but I can't get to the actual Log file - I'll try the link you sent and see what I can get.

No, I did not try smtp setup because the other six instances are working fine without it, which suggests php mail is ok - but who knows. - it will end up being something silly 😊

BlakesHeaven commented 5 years ago

I haven't tried setting logs via .htaccess yet, but I have tried SMTP

This for me is the same on two separate sites hosted with one.com; I'm going to try a mirror of the whole site on another host to see how it behaves there.

As I wish to upgrade Bludit, can you please confirm that Conect3 is ok with Bludit 3.9.x? Can you also confirm where in plugin.php the call is made to send the actual mail in contact3/phpmailer/ either PHPMailerAutoload.php, class.phpmailer.php &/or class.smtp.php. `?

david-novafacile commented 5 years ago

Contact3 is working on Bludit 3.9.x

BlakesHeaven commented 5 years ago

Yep, thanks. I have subsequently installed a new Bludit 3.7.1 and upgraded to v3.9.1 and checked it is OK, albeit on a different hosting platform and as default (out of the box) as possible. I just now need to get a copy of the real site checked out on the other hosting platform - a slow process given my availability. 🤔

BlakesHeaven commented 5 years ago

So, the copy on other hosting platform was working fine... back to the troublesome site.

After getting logging working properly and adding my own code to successfully send phpMail I have determined that if the sending email address is not known to one.com the send fails. I feel that the error reporting of this situation needs to be added. I'll speak to one.com to see if this is something that can be changed. I also need to try with an ,Out of the Box' install of the plugin to confirm this new finding.

BlakesHeaven commented 5 years ago

Hi, just to let you know that my whole issue is due to the fact that my host One.com insist on having email sent from an email address on my domain. When I first set it up it was working, then after the upgrade of Bludit it wasn't. Anyway, the address it really needs to go to is not on the domain, so I have forked your branch and I am adding in a third option to send from. The options will be to:

  1. Send from the User's address
  2. Send from the To address (As you have it)
  3. Send from a Domain address

I'm changing the true/false drop-down to pick one of the three above, and adding a field to supply the domain address.

I will do a pull request, so that if you like it you can incorporate it back into your solution. Thanks

david-novafacile commented 5 years ago

Thats's great. Thank you! It will be added in the next version.