Page 1 of 1

Auto responder

Posted: Wed Feb 20, 2019 2:32 pm
by Lasa
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; } ?>

Re: Auto responder

Posted: Wed Feb 20, 2019 2:59 pm
by Pablo
Did you set page extension to PHP?

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

Re: Auto responder

Posted: Wed Feb 20, 2019 3:14 pm
by Lasa
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

Re: Auto responder

Posted: Wed Feb 20, 2019 3:17 pm
by Pablo
Maybe you have added PHP code to the error or success page (see also the FAQ)?

Re: Auto responder

Posted: Wed Feb 20, 2019 3:34 pm
by Lasa
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

Re: Auto responder

Posted: Wed Feb 20, 2019 3:46 pm
by Lasa
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

Re: Auto responder

Posted: Wed Feb 20, 2019 3:56 pm
by Pablo
The 'from' field should be a valid email address, not just a name.

Re: Auto responder

Posted: Wed Feb 20, 2019 4:05 pm
by Lasa
Thank you so much!