Advancedform_XH

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

twc
Posts: 233
Joined: Fri Jun 18, 2010 12:25 am
Location: Netherlands

Re: Advancedform_XH

Post by twc » Mon Dec 12, 2011 5:35 pm

cmb wrote:Hi twc,
twc wrote:Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mounted-storage/home121a/sub001/sc28987-VHAG/fiberdordrecht.nl/plugins/advancedform/advfrm.php on line 442
That was caused by a bug while processing checkboxes/multi-selects with magic_quotes_qpc=On. Thanks for reporting -- I've already fixed it.

But this should have nothing to do with the sending of mails. I've had a further look at PHPMailer's code, and ini_set() shouldn't be a problem with Advancedform_XH, as this code will not be executed. But I have no clue, what the problem is. So I enabled further debug output, and bundled both changed files for download. Could you please upload the files to the existing Advancedform_XH-1beta9, and test once more?

Christoph
still crap :o

error: Kon mail functie niet initialiseren.

mail fuction...........

[ external image ]

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Advancedform_XH

Post by cmb » Mon Dec 12, 2011 6:11 pm

Hi twc,

I had expected the error message. But weren't there any warnings or notices? It seems not...

Hmm, well, you've said ASForm is working. What's about the built-in mail form. Does it work too? If not, the problem might be related to inaccurate line endings (LF vs. CRLF).
php.net wrote: If messages are not received, try using a LF (\n) only. Some poor quality Unix mail transfer agents replace LF by CRLF automatically (which leads to doubling CR if CRLF is used). This should be a last resort, as it does not comply with » RFC 2822.
but as can be seen on https://bugs.php.net/bug.php?id=15841, this statement is heavily critized. I'm not sure, who's right. :( However, I'll further investigate.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

twc
Posts: 233
Joined: Fri Jun 18, 2010 12:25 am
Location: Netherlands

Re: Advancedform_XH

Post by twc » Mon Dec 12, 2011 6:15 pm

cmb wrote:Hi twc,

I had expected the error message. But weren't there any warnings or notices? It seems not...

Hmm, well, you've said ASForm is working. What's about the built-in mail form. Does it work too? If not, the problem might be related to inaccurate line endings (LF vs. CRLF).
php.net wrote: If messages are not received, try using a LF (\n) only. Some poor quality Unix mail transfer agents replace LF by CRLF automatically (which leads to doubling CR if CRLF is used). This should be a last resort, as it does not comply with » RFC 2822.
but as can be seen on https://bugs.php.net/bug.php?id=15841, this statement is heavily critized. I'm not sure, who's right. :( However, I'll further investigate.

Christoph
asform working fine here :mrgreen:

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Advancedform_XH

Post by cmb » Mon Dec 12, 2011 6:16 pm

Hi twc,
cmb wrote:Hmm, well, you've said ASForm is working
What's about the built-in mailform?

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Advancedform_XH

Post by cmb » Wed Dec 21, 2011 8:42 pm

Hello Community,

I've just released Advancedform_XH 1beta10. It's available from my website.

Advancedform_XH facilitates creating your own mail forms for integration to CMSimple_XH. Advancedform_XH is based on AdvancedForm by Jan Kanters. Due to the increased quality standards of CMSimple_XH and to prevent possible problems with other plugins in the future, a complete rewrite was necessary. Though the functionality basically remains the same, it is to assume, that at least minor bugs were thus introduced.

The current version has to be considered Beta software! Use with caution!

Thanks to all who tested Advancedform_XH so far, for their valuable feedback, which helped me to improve Advancedform_XH to the current state.

From the changelog:
cmb fixed bug that treated multi select POST as string instead of array (reported by twc)
cmb fixed bug that ignored magic_quotes_gpc in advfrm_fields()
cmb removed reference assignments and call-by-reference where not necessary
cmb removed global $advfrm_forms
cmb made confirmation messages more explicit
cmb added possibility to store submitted data to csv file (suggested by johnjdoe)
cmb added access protection per .htaccess for data folder
cmb added configuration option mail_line_ending_*nix
cmb updated manual accordingly
cmb made minor cosmetic changes
cmb added demo form Petition
cmb added sorting of forms by name

Any feedback is welcome -- particularly about "Sending of Mails fails".

Christoph

PS: Cryptographp_XH 1beta1 still doesn't work with Advanceform_XH 1beta10! This will be changed in the next version of Crypthgraphp_XH, which will be released ASAP. Well, I've written this already 12 weeks ago :oops:
Christoph M. Becker – Plugins for CMSimple_XH

twc
Posts: 233
Joined: Fri Jun 18, 2010 12:25 am
Location: Netherlands

Re: Advancedform_XH

Post by twc » Thu Dec 22, 2011 7:09 pm

Could not instantiate mail function.

:evil:

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Advancedform_XH

Post by cmb » Fri Dec 23, 2011 12:17 am

Hi twc,

I'm really sorry about that. But I don't have a clue what's the problem, besides that it's probably related to the MTA. You might try setting line_ending_*nix to 0, but I'm afraid that won't help either.

Did you try sending the mail with XH debug mode set to 6? What's the local value of error_reporting when this setting is set to 6 (see PHP info)? It should be 32767 or otherwise your server's PHP configuration doesn't allow to change to full debug output by prohibiting ini_set().

What's the setting of sendmail_from and sendmail_path in your PHP info? Did you have set To (e-mail) in the form your using to an existing mail address (at least the domain should exist)?

You've written that ASForm works fine. What's the setting of sender_Email_Address? Does it work when it's set to 'true'?

Has anybody any clue what might cause mail() to fail when called from Advancedform_XH through PHPMailer 2.0.4?

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

twc
Posts: 233
Joined: Fri Jun 18, 2010 12:25 am
Location: Netherlands

Re: Advancedform_XH

Post by twc » Fri Dec 23, 2011 9:44 am

cmb wrote:Hi twc,

I'm really sorry about that. But I don't have a clue what's the problem, besides that it's probably related to the MTA. You might try setting line_ending_*nix to 0, but I'm afraid that won't help either.

Did you try sending the mail with XH debug mode set to 6? What's the local value of error_reporting when this setting is set to 6 (see PHP info)? It should be 32767 or otherwise your server's PHP configuration doesn't allow to change to full debug output by prohibiting ini_set().

What's the setting of sendmail_from and sendmail_path in your PHP info? Did you have set To (e-mail) in the form your using to an existing mail address (at least the domain should exist)?

You've written that ASForm works fine. What's the setting of sender_Email_Address? Does it work when it's set to 'true'?

Has anybody any clue what might cause mail() to fail when called from Advancedform_XH through PHPMailer 2.0.4?

Christoph
ERROR / WARNING
Could not instantiate mail function.

must i change somthing @ /plugins/advancedform/phpmailer ? class.smtp.php or class.pop3.php

i have make many websites and jus php mail script all working fine

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Advancedform_XH

Post by cmb » Fri Dec 23, 2011 12:01 pm

Hi twc,

if you use PHP5, please change line 887 in plugins/advancedform/advfrm.php (just above if(!$mail->Send()) {) to

Code: Select all

file_put_contents(advfrm_data_folder().'mail.log', serialize($mail)."\n"); 
Then try sending a mail with a form for which no tanks page is defined. Sending of the mail will not work, but a file mail.log should be created in plugins/advancedform/data (or whatever data folder you have configured). Please send me this file as mail attachment (my address is given in plugins/advancedform/README.txt). I'll try to resent exactly this mail from my server.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Advancedform_XH

Post by cmb » Thu Apr 12, 2012 8:21 pm

Hello Community,

I've just released Advancedform_XH 1beta11. It's available from my website.

It seems I've found and fixed the problem regarding the failing of mailing (thanks to maeg!). It was caused by mistakenly inserted empty CC and BCC headers to the mail. It seems that some servers do not allow to send mails with CC and BCC headers at all. @twc: you're warmly welcome to test, if it works now.

I've fixed some other bugs and made some slight improvements. And I've added two new demo forms and the czech and slovak translations (thanks to oldnema and Tata!).

Any further feedback is welcome!

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply