Reply-To Header set twice - Form Plus error

Permalink Browser Info Environment
Hi, when I try to use this form, I get the following error message:-

Reply-To Header set twice

In my logs I see the following info:-

Exception Occurred: /home3/theverno/public_html/thevernonhanbury/cms/concrete/libraries/3rdparty/Zend/Mail.php:706 Reply-To Header set twice (0)

#0 /home3/theverno/public_html/thevernonhanbury/cms/concrete/core/helpers/mail.php(338): Zend_Mail->setReplyTo('tom@marmaladeso...', NULL)
#1 /home3/theverno/public_html/thevernonhanbury/cms/packages/form_plus/blocks/form_plus/controller.php(493): Concrete5_Helper_Mail->sendMail()
#2 /home3/theverno/public_html/thevernonhanbury/cms/concrete/core/models/block.php(411): FormPlusBlockController->action_submit_form()
#3 /home3/theverno/public_html/thevernonhanbury/cms/concrete/startup/process.php(344): Concrete5_Model_Block->passThruBlock('submit_form')
#4 /home3/theverno/public_html/thevernonhanbury/cms/concrete/dispatcher.php(253): require('/home3/theverno...')
#5 /home3/theverno/public_html/thevernonhanbury/cms/index.php(2): require('/home3/theverno...')
#6 {main}

Type: Discussion
Status: New
localcreative
View Replies:
localcreative replied on at Permalink Reply
localcreative
I took a look further and deleted the following from C5 mail.php -

if(is_array($this->replyto)) {
            foreach ($this->replyto as $reply) {
               $mail->setReplyTo($reply[0], $reply[1]);
            }
         }
         $mail->clearRecipients();


When I then tested the form, the notification email to the form filler was sent, but the notification to me was not. Checking in the logs, this error now appears:-

Mail Exception Occurred. Unable to send mail: Unable to send mail.
#0 /home3/theverno/public_html/thevernonhanbury/cms/concrete/libraries/3rdparty/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 /home3/theverno/public_html/thevernonhanbury/cms/concrete/libraries/3rdparty/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 /home3/theverno/public_html/thevernonhanbury/cms/concrete/core/helpers/mail.php(363): Zend_Mail->send(NULL)
#3 /home3/theverno/public_html/thevernonhanbury/cms/packages/form_plus/blocks/form_plus/controller.php(473): Concrete5_Helper_Mail->sendMail()
#4 /home3/theverno/public_html/thevernonhanbury/cms/concrete/core/models/block.php(411): FormPlusBlockController->action_submit_form()
#5 /home3/theverno/public_html/thevernonhanbury/cms/concrete/startup/process.php(344): Concrete5_Model_Block->passThruBlock('submit_form')
#6 /home3/theverno/public_html/thevernonhanbury/cms/concrete/dispatcher.php(253): require('/home3/theverno...')
#7 /home3/theverno/public_html/thevernonhanbury/cms/index.php(2): require('/home3/theverno...')
#8 {main}
Template Used:
To: info@thevernonhanbury.co.uk, tom@marmaladesoup.com
From: studio@localcreative.co.uk
Reply-To: tom@helmedesign.com
Subject: Loyalty/Supper Club Card Registration Form Submission
Body:
There has been a submission of the form 'Loyalty/Supper Club Card Registration' through the website.
BlueFractals replied on at Permalink Reply
BlueFractals
There was a similar issue that was posted in the Support section of the add-on about 2 months ago.

Have a look at this thread:https://www.concrete5.org/marketplace/addons/form-plus/support/error...

Let me know if this has worked for you.
localcreative replied on at Permalink Reply
localcreative
Sorry, that hasnlt worked for me unless I'm missing something.

The $this->replyto = array(); is already set in the core concrete5 mail.php, as below.

It;s frustrating as I bought this plugin as a quick fix to an issue we were having on a new recently launched site, so i need it fixed asap - I wasn't expecting to have to start delving into core files to try and fix a problem with a plugin.

Are you able, with FTP access, to get this working for me?

public function reset() {
$this->body = '';
$this->headers = array();
$this->to = array();
$this->cc = array();
$this->bcc = array();
$this->replyto = array();
$this->from = array();
$this->data = array();
$this->subject = '';
$this->body = '';
$this->template;
$this->bodyHTML = false;
$this->testing = false;
}
localcreative replied on at Permalink Reply
localcreative
Are you available this evening to fix this? If not, I'm going to have to find an alternative and request a refund for this :(
localcreative replied on at Permalink Reply
localcreative
The fix you suggested above was fixed in the last release for 5.6.3...

Fixedhttp://www.concrete5.org/developers/bugs/5-6-2-1/mail-helper-reply-... (thanks Remo)
BlueFractals replied on at Permalink Reply
BlueFractals
Not sure if you have got this resolved.
Are you using concrete5.6.3.1?
Anyway I've just tested in concrete5.6.2.1 and a fresh installation of concrete5.6.3.1. The add-on is working fine on both versions without having to make any changes to the code.

Regarding "Unable to send email" error message, that could be due to your mail server not responding. I tried turning off my local mail server and I got the same message. When I turned it back on, the emails have started working again. So it was the issue with the mail server.

I also did not get "Header set twice" error.

Try using the Concrete5's core Form and see if you having the same issue. It could be due to an issue in your mail server.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.