Dear all,<br><br>I've been trying to use the recipe mailform2 to send to an email address the data collected from 2 forms on a single website. Here is the piece of code I am using and that I can't get to work:<br><br>
include_once("$FarmD/cookbook/mailform2.php"); <br>#<br>#Application form<br>if ($pagename == 'Main.ApplyForPosition') {<br>$Mailform2Subject='New volunteer candidate';<br>$Mailform2SuccessPage='
Main.SuccessfulVolunteerRegistration';<br>$Mailform2FailurePage='Main.VolunteerRegistrationFailure';<br>$Mailform2Recipient='<a href="mailto:me@mydomain.com">me@mydomain.com</a>';<br>$Mailform2Text = "First name:" . $_POST['first_name'] . "Last name:" . $_POST['last_name'] ;
<br>#<br>#Subscription to the newsletter<br>} else {<br>$Mailform2Subject='New subscription';<br>$Mailform2SuccessPage='Main.SuccessfulRegistration';<br>$Mailform2FailurePage='Main.RegistrationFailure';
<br>$Mailform2Recipient='<a href="mailto:me@mydomain.com">me@mydomain.com</a>';<br>$Mailform2Text = $_POST['username'] . ": " . $_POST['email'] . $FullName;<br>}<br><br>The script does not work because even if I am on the page
Main.ApplyForPosition, it goes in the "else".<br><br>Can you help me to find the problem?<br>Kind regards,<br><br>Benoit<br><br><br>