Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1453 2014-08-24 14:13:01

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

You could try one other thing: replace the “mail” command in the previous example with:

mail($to, $subject, $message, $headers, '-fyour.own@email.address.at.the.hosted.domain.com')

If that fails as well then all that should be enough to convince the hoster that it’s a problem on their end. You could go one step further, if you have SSH access to the server, by manually starting an SMTP session by telnetting to port 25 on 127.0.0.1 and seeing what happens if you try to submit mail that way (HELO example.com; MAIL FROM: <uk.email@address.co.uk>; RCPT TO: <your@address.com>; DATA; enter an email manually including header, then finish off with a dot on a single line)

Offline

#1454 2014-08-24 17:25:56

castanet
Member
From: Oxford
Registered: 2005-03-19
Posts: 97

Re: zem_contact_reborn 4.0.3.20

OK. I have tried the first test again on another site where I am getting the form error message ‘Sorry, unable to send email’ and I am getting a ‘success’ message every time with a variety of addresses. Is it clear what is happening?

Offline

#1455 2014-08-24 21:32:46

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

No. That doesn’t make sense.

Offline

#1456 2014-08-28 17:31:28

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: zem_contact_reborn 4.0.3.20

Hi, we just noticed the same “Sorry, unable to send email” issue on one of our clients’ sites hosted here in the USA.

Ruud, I did your test with the initial test.php page using the same email address (USA based, regular .com address) and it gave me a “success” message. Any other ideas or tests we can run?

Offline

#1457 2014-08-28 17:53:03

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: zem_contact_reborn 4.0.3.20

I just tested it again and noticed a brief flash of an error message at top, other than the “sorry” message. I looked at the source and found this (replaced my actual email with fake in code):


Invalid address: SMTP -> ERROR: Failed to connect to server: Permission denied (13)
<br />The following From address failed: my@email.address : Called Mail() without being connected

Offline

#1458 2014-08-28 17:54:47

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: zem_contact_reborn 4.0.3.20

Correction … the “invalid address” error message is displayed at the top of the page after all. I just had to scroll the page back up to see it.

Offline

#1459 2014-08-29 12:06:28

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

Alannie, that looks like a PHPmailer error message. ZCR doesn’t use that normally. Is this the plugin modified to work with PHPmailer?

Offline

#1460 2014-10-02 10:17:28

castanet
Member
From: Oxford
Registered: 2005-03-19
Posts: 97

Re: zem_contact_reborn 4.0.3.20

OK. On a site running Txp 4.3.0, I went into the plugin code and removed this from the headers:
X-Originating-IP

The form now works. Eureka!
However… I tried to do the same for a site running on 4.5.1 and got a 412 error when I tried to save the modified script.
Any other suggestions gratefully received

Offline

#1461 2014-10-02 10:43:59

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: zem_contact_reborn 4.0.3.20

You could try to save the modified plugin on the 4.3.0 website with ied_plugin_composer and then install it on 4.5.1.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#1462 2014-10-02 11:00:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: zem_contact_reborn 4.0.3.20

castanet wrote #284435:

got a 412 error when I tried to save the modified script.

Precondition failed? Weird. That’s probably a server setup issue. I’ve had 404s and other codes thrown when trying to save plugin content, because the host’s anti-spam measures kicked in. This plugin in particular might trip such filters up because of the content and the way it deals with user input in the code.

If it’s just this plugin that fails when saving, talk to your host, tell them what you’re trying to do and see if there’s something they can do to tweak the filter rules to stop it barfing.

Alternatively [Edit: Uli beat me to it], use ied_plugin_composer to export the modified plugin from the 4.3.0 environment as a .txt (or zipped .txt) file, then install it directly via the Admin->Plugins panel on your 4.5.1 installation. And then make a mental note to upgrade to 4.5.7 :-)

On a site running Txp 4.3.0, I went into the plugin code and removed this from the headers: X-Originating-IP

Incidentally, why do you need to remove this? Is it something the plugin could help with? Maybe if the plugin set up an array of header-name + header content pairs and fired a callback to allow them to be modified directly before sending? Would that help and remove the need to hack the code?

Last edited by Bloke (2014-10-02 11:01:13)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#1463 2014-10-02 12:05:16

castanet
Member
From: Oxford
Registered: 2005-03-19
Posts: 97

Re: zem_contact_reborn 4.0.3.20

Thanks Uli and Bloke. To use ied_plugin_composer it seems I need to upgrade the Txp version (yes, yes, I know I should do it anyway) but it might then undo my hack with ZCR. Bloke, the problem I am having is that ZCR is failing on all my sites for a random selection of people across the UK. I have always suspected it is a hosting/IP-related issue or an incompatibility between the hosting and Textpattern but the hosts just blame ZCR. I’m out of my depth beyond that and I’m afraid I didn’t understand the rest of your suggestion re the array… :-)

Offline

#1464 2014-10-02 12:56:03

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: zem_contact_reborn 4.0.3.20

castanet wrote #284441:

To use ied_plugin_composer it seems I need to upgrade the Txp version

Stef maintains a list of previous plugin versions. You could try v0.93 which came out in the same year as TXP 430.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

Board footer

Powered by FluxBB