Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#577 2009-03-25 23:51:53

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: zem_contact_reborn 4.0.3.20

Don’t know if it will work for you, but I once solved a similar problem by adding from="mail@mywebsite.com" to the tag.

Last edited by els (2009-03-25 23:56:10)

Offline

#578 2009-03-26 00:33:34

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: zem_contact_reborn 4.0.3.20

I’m experiencing the same exact problem, the “thank you “ message appears but no mail seems to be sent.
I can’t find it now but just yesterday I found a previous post regarding the same problem in which ruud suggests to upload a file called mail.php to the site root with a code similar to this:

<?php mail('your_email_address@example.com', 'php mail test', 'message_sent'); ?>

If you visit this page (yoursite/mail.php) and the message “message_sent” shows up than you have a problem and you should ask your provider – which is what I have already done without answer till now :-(.

Els, I’ve tried your suggestion but unfortunately doesn’t seem to work.

Offline

#579 2009-03-26 10:18:20

everton11
New Member
Registered: 2009-03-25
Posts: 3

Re: zem_contact_reborn 4.0.3.20

Thanks for the suggestions els and redbot, but neither seems to work. I’ve sent mail from my gmail account to the websites e-mail address and it show up in the inbox just fine. Obviously, something is just not connecting properly between the zem contact form and the websites inbox. I’m just at a loss..

Offline

#580 2009-03-26 10:21:37

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: zem_contact_reborn 4.0.3.20

May be mail was marked as spam? Sometimes this ha[[ens with my gmail accounts, when i send mail from site with zem_contact_reborn. The solution is simple – unmark messages as “no spam” for some period and they will be added to your “white list”


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#581 2009-03-26 10:55:46

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: zem_contact_reborn 4.0.3.20

the_ghost wrote:

May be mail was marked as spam? Sometimes this ha[[ens with my gmail accounts, when i send mail from site with zem_contact_reborn. The solution is simple – unmark messages as “no spam” for some period and they will be added to your “white list”

Thank you, this is the first thing I thought but no, its not my case.

everton11,
Have you tried to ask your hosting? Unfortunately I’m experiencing the problem with an existing site hosted by a seemingly not so collaborative hosting company. I have no access to a control panel, to error logs, nothing… and they keep ignoring my questions. grrrr

Last edited by redbot (2009-03-26 11:20:14)

Offline

#582 2009-03-26 12:00:34

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: zem_contact_reborn 4.0.3.20

Redbot,

Do you receive mail from TXP itself, for instance when you create a new temporary user (i.e. yourself at your email address)? Do you need to add a valid domain email address to the TXP advanced option SMTP envelope sender address to make this happen? If the answer to both is Yes, then your host may have restrictions on the use of php mail() which both TXP Admin and ZCR use to send email. The SMTP envelope email address arrangement only operates on TXP, not plugins like ZCR that use php mail().

If the answer to the first question above is No, even when you have a valid domain email address in the TXP advanced option SMTP envelope sender address then your host may have disabled php mail() completely. Some Hosts restrict or ban use of this function as an anti-spam/security measure.

Last edited by joebaich (2009-03-26 12:05:12)

Offline

#583 2009-03-26 12:06:28

everton11
New Member
Registered: 2009-03-25
Posts: 3

Re: zem_contact_reborn 4.0.3.20

This must be the problem. This is from the Knowledgebase at WebFaction support:

“The “issue” is that we currently do not have local instance of Sendmail running on our shared servers, which is the reason why you can’t use PHP mail() function as is (which relies on the local instance of the Sendmail compatible mail transfer agent interface). The reasoning behind this is to help circumvent spam and possible abuse of the system.

Instead, you need to use some SMTP server and properly authenticate before you can send mail. You can use your WebFaction supplied SMTP server or any other you see fit.”

I still don’t know where to go from here.

Offline

#584 2009-03-26 12:30:14

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: zem_contact_reborn 4.0.3.20

See the posts here for the best solution. I use WebFaction to host some sites, and it works perfectly. Note the need to add the fix to ZCR and any other plugins that use php mail() too. I use the same method to fix a similar problem with Mosso who place restrictions on php mail(). The SMTP envelope sender address option takes care of TXP’s admin but not plug-ins.

Last edited by joebaich (2009-03-26 12:30:41)

Offline

#585 2009-03-26 12:52:21

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: zem_contact_reborn 4.0.3.20

joebaich wrote:

…Do you receive mail from TXP itself, for instance when you create a new temporary user (i.e. yourself at your email address)? Do you need to add a valid domain email address to the TXP advanced option SMTP envelope sender address to make this happen? If the answer to both is Yes, then your host may have restrictions on the use of php mail() which both TXP Admin and ZCR use to send email. The SMTP envelope email address arrangement only operates on TXP, not plugins like ZCR that use php mail()….

Joe,
first of all thanks for your help, very appreciated,
secondly you are right: I’ve noticed txp itself doesn’t send emails if I don’t add a valid domain email address to the TXP advanced option “SMTP envelope sender address” (I have developed the site in a local environment and I didn’t add any user since the site is online so I never realized that).
So my answer is “yes” to both your questions.
Do you think there is something I can do to make zcr work?

edit Oops now I see you have already answered. I’ll investigate further and let you know how it goes, thanks!

Last edited by redbot (2009-03-26 12:55:13)

Offline

#586 2009-03-26 13:11:25

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: zem_contact_reborn 4.0.3.20

redbot wrote:

Do you think there is something I can do to make zcr work?

edit Oops now I see you have already answered. I’ll investigate further and let you know how it goes, thanks!

You are welcome. I will gladly email you copies of the amended files but it’s probably better for you to make the amendments yourself because the method applies to other plugins too e.g. ign_password_protect. Note that the mail function in TXP lib/txplib_misc.php isn’t at #931 in TXP 4.0.8. The search for “mail(” hint is a good one and there is a requirement to replace “mail” with“smtp“it in 2 places in that file.

Offline

#587 2009-03-26 20:57:49

visualpeople
Member
From: Corvallis, Oregon - USA
Registered: 2005-11-16
Posts: 73
Website

Re: zem_contact_reborn 4.0.3.20

Is there a way to get the id of the form for use outside of it?

For example, I have a short jquery script that I want to validate one of the fields before it’s submitted and I need to reference the id of the form itself (eg. zcr33923023084050) so that my javascript knows which form to look in to perform the validation. But since the id changes based on a random string, I can’t just hard code the id into my javascript.

(by the way, both the script and the <txp:zem_contact> form within the same article, so it should be possible, I think, I’m just trying all the wrong things, I guess.)

Offline

#588 2009-03-27 01:33:52

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: zem_contact_reborn 4.0.3.20

Joe,
I don’t understand much about server related things so pardon if my questions sound dumb.
I’ve gone throught these steps:

  1. uploaded the script you linked to to lib/pearmail.php
  2. in lib/txplib_misc.php added include_once(‘pearmail.php’) at line 971 and replaced “mail” with “smtp” in two instances (line1036 and 1040)
  3. in zcr , again, added include_once(‘pearmail.php’) at line 3 and replaced “mail” with “smtp” in two instances (line 229 and 235)

now when I browse to my “contacts” page this error appears:

Fatal error: require_once() [function.require]: Failed opening required 'Mail.php' (include_path='.:/usr/share/php:/usr/share/pear') in ..../textpattern/lib/pearmail.php on line 35

Which makes me think there is something missing from the server.
Before I give up can I ask you to send me your amended files just to make sure I’m not doing some stupid mistake?
(And, to worsen things, I suppose I have to configure the “pearmail.php” script inserting username, password and smtp server. Which obviously I don’t know)

I Hope I’m not bothering too much with all these questions… thanks anyway for your help.

Offline

Board footer

Powered by FluxBB