Auto responder

Issues related to forms.
Post Reply
Lasa
 
 
Posts: 280
Joined: Sat Oct 06, 2018 3:08 pm

Auto responder

Post by Lasa » Wed Feb 20, 2019 2:32 pm

I'm doing something wrong.
I have auto responder enabled
from: I have the email address that is set up on form processing <--is that right?
Subject: test of auto responder
Message: Did this get returned as a reply?
email format: Plain text
Input filed name: email <-which is the editobox names email

I've read help and searched the forum ... yet I'm getting some errors.
I remove the responder and it works great.

Cheers,
Lasa

the error:
"; } if (!empty($error)) { $errorcode = file_get_contents($error_url); $replace = "The specified email address is invalid!
"; $errorcode = str_replace($replace, $error, $errorcode); echo $errorcode; exit; } $internalfields = array ("submit", "reset", "send", "filesize", "formid", "captcha_code", "recaptcha_challenge_field", "recaptcha_response_field", "g-recaptcha-response"); $message .= $eol; $logdata = ''; foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { if (!is_array($value)) { $message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } else { $message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; } } } $body = 'This is a multi-part message in MIME format.'.$eol.$eol; $body .= '--'.$boundary.$eol; $body .= 'Content-Type: text/plain; charset=ISO-8859-1'.$eol; $body .= 'Content-Transfer-Encoding: 8bit'.$eol; $body .= $eol.stripslashes($message).$eol; if (!empty($_FILES)) { foreach ($_FILES as $key => $value) { if ($_FILES[$key]['error'] == 0) { $body .= '--'.$boundary.$eol; $body .= 'Content-Type: '.$_FILES[$key]['type'].'; name='.$_FILES[$key]['name'].$eol; $body .= 'Content-Transfer-Encoding: base64'.$eol; $body .= 'Content-Disposition: attachment; filename='.$_FILES[$key]['name'].$eol; $body .= $eol.chunk_split(base64_encode(file_get_contents($_FILES[$key]['tmp_name']))).$eol; } } } $body .= '--'.$boundary.'--'.$eol; if ($mailto != '') { mail($mailto, $subject, $body, $header); } $autoresponder_header = 'From: '.$autoresponder_from.$eol; $autoresponder_header .= 'Reply-To: '.$autoresponder_from.$eol; $autoresponder_header .= 'MIME-Version: 1.0'.$eol; $autoresponder_header .= 'Content-Type: text/plain; charset=ISO-8859-1'.$eol; $autoresponder_header .= 'Content-Transfer-Encoding: 8bit'.$eol; $autoresponder_header .= 'X-Mailer: PHP v'.phpversion().$eol; foreach ($_POST as $key => $value) { if (!in_array(strtolower($key), $internalfields)) { if (!is_array($value)) { $autoresponder_message .= ucwords(str_replace("_", " ", $key)) . " : " . $value . $eol; } else { $autoresponder_message .= ucwords(str_replace("_", " ", $key)) . " : " . implode(",", $value) . $eol; } } } mail($autoresponder_to, $autoresponder_subject, $autoresponder_message, $autoresponder_header); header('Location: '.$success_url); exit; } ?>

User avatar
Pablo
 
Posts: 15904
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Auto responder

Post by Pablo » Wed Feb 20, 2019 2:59 pm

Did you set page extension to PHP?

Related FAQ:
http://www.wysiwygwebbuilder.com/forum/ ... 10&t=32967

Lasa
 
 
Posts: 280
Joined: Sat Oct 06, 2018 3:08 pm

Re: Auto responder

Post by Lasa » Wed Feb 20, 2019 3:14 pm

Yes its set to php. I have read the link in my searches before asking... but something is wrong on my end..as you can see by the error that shows on the page after submitting.
Lasa

User avatar
Pablo
 
Posts: 15904
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Auto responder

Post by Pablo » Wed Feb 20, 2019 3:17 pm

Maybe you have added PHP code to the error or success page (see also the FAQ)?

Lasa
 
 
Posts: 280
Joined: Sat Oct 06, 2018 3:08 pm

Re: Auto responder

Post by Lasa » Wed Feb 20, 2019 3:34 pm

Thanks for the heads up.
Since I was just testing i had the contact on the index page so I had it as index.php... change it to index.html now
the error and success I had simply set to index for simplicity or lazyness while i worked this out (my bad)
So I build them using html
Now its not showing the error code which is a step in the right direction, but it's going directly to error page?

Anything else I could be doing wrong?
Lasa

Lasa
 
 
Posts: 280
Joined: Sat Oct 06, 2018 3:08 pm

Re: Auto responder

Post by Lasa » Wed Feb 20, 2019 3:46 pm

Got it Pablo!
I had in "More Form Processor Properties".. indicated from: XYZ company

So it was probably in conflict with email address entered in Form / general but its now working!
Thanks you!
Lasa

User avatar
Pablo
 
Posts: 15904
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Auto responder

Post by Pablo » Wed Feb 20, 2019 3:56 pm

The 'from' field should be a valid email address, not just a name.

Lasa
 
 
Posts: 280
Joined: Sat Oct 06, 2018 3:08 pm

Re: Auto responder

Post by Lasa » Wed Feb 20, 2019 4:05 pm

Thank you so much!

Post Reply