matthart
Forum Replies Created
-
For closure’s sake, I’ll share what ended up happening. I contacted our hosting provider and they said they don’t unblock smtp ports on the hosting plan we’re using, but they have a local smtp server. So I added email accounts in our cpanel, which is actually better in the case where we’re only sending emails, because it’s free compared to Office’s 5$ per account, but all our inbound emails will still go to Office. I was then able to setup your plugin with our mail server instead and it worked perfectly right away. So it all worked out in the end.
So I was able to make a local copy of the site and I tested your plugin and it worked perfectly. I also decided to triple-check it wasn’t your plugin by trying another SMTP plugin on our live site, and it got the same Connection Refused error. So it’s pretty much confirmed now that it’s our hosting provider, so I guess I’ll have to ask them about sending via SMTP, even though telnet said the ports were technically open.
I appreciate your help until now, I know it’s been a long journey, and I’m glad you at least got something out of it (and I got my reply-to field).
Anyway, I’ll be
closingmarking this as resolved now.I was excited to have it finally working and I appreciate you adding the reply-to field. I wish I didn’t have more bad news, but it’s not working. I had to deactivate the plugin for now because on every form submission, the website crashes and says there’s a critical wordpress error. That’s about where the bad news ends.
The good news is that it might not be an issue with the plugin. I checked debug logs and I got
[2021-10-20 01:37:03]: SMTP ERROR: Failed to connect to server: Connection refused (111)
[2021-10-20 01:37:03]: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/TroubleshootingI looked at the supplied page and found that that error can be caused by our hosting provider having firewalls on the SMTP ports. I tried telnet to check if port 25 and 587 were open, and it said they were, so theoretically, it shouldn’t be that. Also, since the log says “Connection refused” and not “Could not connect” like on the phpmailer troubleshooting page, I don’t think it’s the port being closed, but something is getting in the way of connecting to the smtp servers. I did try with gmail as well, and got the same thing, so it’s more likely on our hosting provider’s side than outlook’s side.
I tried to ssh into it to try manually connecting to the smtp server to see what would go wrong, but our hosting provider blocks ssh by default, so I’ll have to contact them to change that.
I just found a really easy way to make a local copy of the wordpress site, so I will be trying that later tonight to see if your plugin works. If it does, then I’ll know for sure that it’s an issue with our hosting provider.
I’ll keep this open until then. I really appreciate you trying to help solve a problem that might not have even existed in the first place lol
I got those by turning on the debug settings in your plugin and submitting a form. I assumed they would help because they were the only lines in debug.log that came from your plugin. I’ll just email you about admin access and you can take a look yourself.
Here’s what I got. Let me know if/when you want admin access or anything else you want me to do (like adding some echo statements). Our hosting provider doesn’t have an easy “add staging site”, so I’d rather not go through the trouble of doing it manually just for this unless we decide it’s absolutely necessary.
[18-Oct-2021 16:35:42 UTC] PHP Notice: Undefined index: fieldId in /home/user/public_html/wp-content/plugins/smtp-settings-for-gravity-forms/work/inc/kp-gfsmtp-extend-common.php on line 82
[18-Oct-2021 16:35:42 UTC] PHP Notice: Undefined index: value in /home/user/public_html/wp-content/plugins/smtp-settings-for-gravity-forms/work/inc/kp-gfsmtp-extend-common.php on line 84
[18-Oct-2021 16:35:42 UTC] PHP Notice: Undefined index: operator in /home/user/public_html/wp-content/plugins/smtp-settings-for-gravity-forms/work/inc/kp-gfsmtp-extend-common.php on line 84
[18-Oct-2021 16:35:42 UTC] PHP Warning: extract() expects parameter 1 to be array, object given in /home/user/public_html/wp-content/plugins/gravityforms/common.php on line 2391Even though I verified that Outlook through SMTP is working for us with javascript, I know Outlook causes issues with a lot of people with SMTP, so I tried with Gmail and it also didn’t have an effect. It’s still sending emails, just not through SMTP, regardless of setup. The issue seems to be with the plugin not overriding the default email sending. If I have a from email address in the gravity form notifications settings, it’ll send from that email. If I don’t, it sends from the site admin email.
Email provider is Outlook.
Can I replace the wp-config on the server while people are editing and using the site or should I wait until after 5?
Sorry, it’s a business website, not personal, I’m just helping them with these forms, so I had to clear it with the relevant teams, and there were some modifications to our plan, so I didn’t know if we were going to use this method anymore anyway.
I don’t have any other SMTP plugins installed.
I don’t know why the test SMTP isn’t working either. I’m using the newest version of Chrome, I don’t have any js disabled. XMLHttpRequest is working. Ajax should definitely be fine.
Is there any way to look at the debug info only using the online editor or without enabling debug on the live site? I tried a couple plugins, none could do what I wanted. I’ve never developed with wordpress before, I was just helping with these forms.
I will email you about the admin access today.