Hey everyone,
I am new to expression engine. I have inherited an EE project. We moved hosts and now the contact email forms are complaining about not having recipients. Now, hear me out.
EE version 1.66 on a linux host.
Original working Code:
{exp:email:contact_form user_recipients="false" charset="utf-8"}
<input type="hidden" id="subject" name="subject" size="40" value="Test Form" />
<?php
$email_0 = '[email protected]'; //test without hash
$email_1 = base64_encode('[email protected]'); //test with hash
?>
<select name="recipients" id="recipients">
<option selected="selected">-- Select Location --</option>
<option value="<?php echo $email_0; ?>">No Hash</option>
<option value="<?php echo $email_1; ?>">Hash</option>
</select>This broke when moving webservers. According to the documentation on EE, the form post variables needs to be labeled “to” and not “recipients”.
I tried all kinds of combination’s
- Form variable named “to” with user_recipients=“true”
result:
failed on base64 hash but WORKS with no hash
- Form variable named “recipients” and user_recipients=“true”
result:
failed - no recipients error
- Form variable named “recipients” and user_recipients=“false”
result:
failed - no recipients error
I could never get it to send emails if the form <select> tag was named “recipients”.
The problem is that we do not want the public to be able to read the email addresses in the <select> tag which means that we have to hash the email addresses. I couldn’t make any scenario work correctly with the hash.
Thanks to anyone who can help!