MainStWebGuy Posted January 20, 2009 Share Posted January 20, 2009 hello again all, I have a form i'm wanting to use on a website but can't seem to figure out why the mail() function isn't sending the message... I'm still a newbie, and i'm hoping it's something simple, but i can't seem to find it.... <?php //if the submit button is pressed if (isset($_POST['submit2'])) { //set variables from form data $name = htmlspecialchars($_POST['cName']); $phone = htmlspecialchars($_POST['cPhone']); $fax = htmlspecialchars($_POST['faxNumber']); $address = htmlspecialchars($_POST['companyAddress']); $city = htmlspecialchars($_POST['city']); $state = htmlspecialchars($_POST['state']); $zip = htmlspecialchars($_POST['zipCode']); $fedTaxId = htmlspecialchars($_POST['fedTaxId']); $oName = htmlspecialchars($_POST['ownersName']); $eCommerceManager = htmlspecialchars($_POST['eCommerceManager']); $email = htmlspecialchars($_POST['emailAddress']); $whatForm = htmlspecialchars($_POST['serviceForm']); //EDI variables $volume = htmlspecialchars($_POST['volumePlan']); $ediTerms = htmlspecialchars($_POST['ediTermsOfService']); $ediPayment = htmlspecialchars($_POST['paymentOptions']); //Glaxis Variables $dispatch = htmlspecialchars($_POST['lynxDispatch']); $liveDate = htmlspecialchars($_POST['liveDate']); $ppgSetup = htmlspecialchars($_POST['ppgOnlineOrdering']); $glaxisTerms = htmlspecialchars($_POST['glaxisTermsOfService']); $ediMsg = "Another customer has signed up for EDI.\n\nCompany Name: $cName\nPhone: $cPhone\nFax: $fax\nAddress: $address\nCity: $city\nState: $state\nZip: $zip\nFed Tax Id: $fedTaxId\nOwners Name:$oName\neCommerce Manager: $eCommerceManager\nEmail: $email\n\nVolume Plan: $volume\nAgree to Terms: $ediTerms\nEDI Payment Type: $ediPayment\n"; $glaxisMsg = "Another Customer has signed up for Glaxis.\n\nCompany Name: $cName\nPhone: $cPhone\nFax: $fax\nAddress: $address\nCity: $city\nState: $state\nZip: $zip\nFed Tax Id: $fedTaxId\nOwners Name:$oName\neCommerce Manager: $eCommerceManager\nEmail: $email\n\nPrevious Dispatch Number: $dispatch\nLive Date: $liveDate\nPPG Setup: $ppgSetup\nAgree to Terms: $glaxisTerms\n"; switch ($_POST['serviceForm']) { case 'EDI': mail ("[email protected]","EDI Service request form", "$ediMsg"); break; case 'Glaxis': mail("[email protected]@mainstreetcomp.com", "Glaxis Service request form", "$glaxisMsg"); break; case 'EDI and Glaxis': mail ("[email protected]", "EDI Service request form", "$ediMsg"); mail("[email protected]", "Glaxis Service request form", "$glaxisMsg"); break; } //tell user that form has been submitted //and to check for confirmation echo '<p align="center">'."Your form has been submitted. Check your inbox for a confirmation message.".'</p>'; } else { //if submit has not been pressed, display form ?> <html> <head></head> <body> <form name="form2" method="POST" action="<?php echo $_SERVER['PHP_SELF'] ?>"> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td>Company Name:</td> <td> <?php //if name has been filled in previously, //fill in this field if ($_POST['cName'] == true) { echo'<input type="text" name="cName" value="'.$_POST['cName'].'" />'; } else { echo'<input type="text" name="cName" />'; } ?> </td> </tr> <tr> <td>Phone Number:</td> <td> <?php if ($_POST['cPhone'] == true) { echo'<input type="text" name="cPhone" value="'.$_POST['cPhone'].'" />'; } else { echo'<input type="text" name="cPhone" />'; } ?> </td> </tr> <tr> <td>Fax Number:</td> <td> <?php if ($_POST['faxNumber'] == true) { echo'<input type="text" name="faxNumber" value="'.$_POST['faxNumber'].'" />'; } else { echo'<input type="text" name="faxNumber" />'; } ?> </td> </tr> <tr> <td>Company Address:</td> <td> <?php if ($_POST['companyAddress'] == true) { echo'<input type="text" name="companyAddress" value="'.$_POST['companyAddress'].'" />'; } else { echo'<input type="text" name="companyAddress" />'; } ?> </td> </tr> <tr> <td>City:</td> <td> <?php if ($_POST['city'] == true) { echo'<input type="text" name="city" value="'.$_POST['city'].'" />'; } else { echo'<input type="text" name="city" />'; } ?> </td> </tr> <tr> <td>State:</td> <td> <?php if ($_POST['state'] == true) { echo'<input type="text" name="state" value="'.$_POST['state'].'" />'; } else { echo'<input type="text" name="state" />'; } ?> </td> </tr> <tr> <td>Zip Code:</td> <td> <?php if ($_POST['zipCode'] == true) { echo'<input type="text" name="zipCode" value="'.$_POST['zipCode'].'" />'; } else { echo'<input type="text" name="zipCode" />'; } ?> </td> </tr> <tr> <td>Fed Tax ID:</td> <td> <?php if ($_POST['fedTaxId'] == true) { echo'<input type="text" name="fedTaxId" value="'.$_POST['fedTaxId'].'" />'; } else { echo'<input type="text" name="fedTaxId" />'; } ?> </td> </tr> <tr> <td>Owner's Name:</td> <td> <?php if ($_POST['ownersName'] == true) { echo'<input type="text" name="ownersName" value="'.$_POST['ownersName'].'" />'; } else { echo'<input type="text" name="ownersName" />'; } ?> </td> </tr> <tr> <td>E-Commerce Manager (if different from above):</td> <td> <?php if ($_POST['eCommerceManager'] == true) { echo'<input type="text" name="eCommerceManager" value="'.$_POST['eCommerceManager'].'" />'; } else { echo'<input type="text" name="eCommerceManager" />'; } ?> </td> </tr> <tr> <td>Email Address:</td> <td> <?php if ($_POST['emailAddress'] == true) { echo'<input type="text" name="emailAddress" value="'.$_POST['emailAddress'].'" />'; } else { echo'<input type="text" name="emailAddress" />'; } ?> </td> </tr> <tr> <td>What service form do you need to submit?</td> <td><select name="serviceForm" onChange="document.form2.submit();"> <option>Select One</option> <option>EDI</option> <option>Glaxis</option> <option>EDI and Glaxis</option> </select> </td> </tr> <?php //depending on what the user chose from the previous drop-down, //display appropriate fields switch ($_POST['serviceForm']) { //if user selected EDI, show these fields case 'EDI': ?> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"><strong>EDI Service Request</strong></td> </tr> <tr> <td>EDI Volume Plan:</td> <td><input name="volumePlan" type="checkbox" value="low volume" /> Low Volume (10 or less invoices/month)<br /> <input name="volumePlan" type="checkbox" value="standard volume" /> Standard Volume (10+ invoices/month) </td> </tr> <tr> <td>Do you accept the EDI Terms of Service?</td> <td><select name="ediTermsOfService"> <option>Yes</option> <option selected="selected">No</option> </select> </td> </tr> <tr> <td>How would you like to pay your monthly fees?</td> <td><select name="paymentOptions"> <option>Check (adds $10/month processing fee)</option> <option selected="selected">Direct Debit (E.F.T.)</option> </select> </td> </tr> <tr> <td> </td> <td valign="top"><input type="submit" name="submit2" value="Send Form" onClick="addon.value = 'go!';" /></td> </tr> </table> </form> </body> </html> <?php //end fields for "EDI" choice break; //if user selected Glaxis, show these fields case 'Glaxis': ?> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"><strong>Glaxis Service Request</strong></td> </tr> <tr> <td>Previous Lynx Dispatch Number:</td> <td><input type="text" name="lynxDispatch" /></td> </tr> <tr> <td>When would you like to go Live??</td> <td><input type="text" name="liveDate" /></td> </tr> <tr> <td>Would you like to setup PPG online ordering?</td> <td><select name="ppgOnlineOrdering"> <option selected="selected">Yes</option> <option>No</option> </select> </td> </tr> <tr> <td>Do you accept the Glaxis Terms of Service?</td> <td><select name="glaxisTermsOfService"> <option>Yes</option> <option selected="selected">No</option> </select> </td> </tr> <tr> <td> </td> <td valign="top"><input type="submit" name="submit2" value="Send Form" onClick="addon.value = 'go!';" /></td> </tr> </table> </form> </body> </html> <?php //end fields for "Glaxis" choice break; //if user selected EDI and Glaxis, show these fields case 'EDI and Glaxis': ?> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"><strong>EDI Service Request</strong></td> </tr> <tr> <td>EDI Volume Plan:</td> <td><input name="volumePlan" type="checkbox" value="low volume" /> Low Volume (10 or less invoices/month)<br /> <input name="volumePlan" type="checkbox" value="standard volume" /> Standard Volume (10+ invoices/month) </td> </tr> <tr> <td>How would you like to pay your monthly fees?</td> <td><select name="paymentOptions"> <option>Check (adds $10/month processing fee)</option> <option selected="selected">Direct Debit (E.F.T.)</option> </select> </td> </tr> <tr> <td>Do you accept the EDI Terms of Service?</td> <td><select name="termsOfService"> <option>Yes</option> <option selected="selected">No</option> </select> </td> </tr> <tr> <tr> <td colspan="2"> </td> </tr> <td colspan="2"><strong>Glaxis Service Request</strong></td> </tr> <tr> <td>Previous Lynx Dispatch Number:</td> <td><input type="text" name="lynxDispatch" /></td> </tr> <tr> <td>When would you like to go Live??</td> <td><input type="text" name="liveDate" /></td> </tr> <tr> <td>Would you like to setup PPG online ordering?</td> <td><select name="ppgOnlineOrdering"> <option selected="selected">Yes</option> <option>No</option> </select> </td> </tr> <tr> <td>Do you accept the Glaxis Terms of Service?</td> <td><select name="glaxisTermsOfService"> <option>Yes</option> <option selected="selected">No</option> </select> </td> </tr> <tr> <td> </td> <td valign="top"><input type="submit" name="submit2" value="Send Form" onClick="addon.value = 'go!';" /></td> </tr> </table> </form> </body> </html> <?php //end fields for EDI and Glaxis break; default: ?> </table> </form> </body> </html> <?php } } ?> My echo statement is working after the form is submitted, but the messages aren't sending (that i can tell) i've been testing with my yahoo email account but haven't been getting anything... What am i overlooking? thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/141599-solved-trouble-with-mail-function/ Share on other sites More sharing options...
machupicchu Posted January 20, 2009 Share Posted January 20, 2009 first tool in debugging php is your echo statement. how do I know that the mail function is even getting called? well let's place echo statements there to find out! <?php //if the submit button is pressed if (isset($_POST['submit2'])) { //set variables from form data $name = htmlspecialchars($_POST['cName']); $phone = htmlspecialchars($_POST['cPhone']); $fax = htmlspecialchars($_POST['faxNumber']); $address = htmlspecialchars($_POST['companyAddress']); $city = htmlspecialchars($_POST['city']); $state = htmlspecialchars($_POST['state']); $zip = htmlspecialchars($_POST['zipCode']); $fedTaxId = htmlspecialchars($_POST['fedTaxId']); $oName = htmlspecialchars($_POST['ownersName']); $eCommerceManager = htmlspecialchars($_POST['eCommerceManager']); $email = htmlspecialchars($_POST['emailAddress']); $whatForm = htmlspecialchars($_POST['serviceForm']); //EDI variables $volume = htmlspecialchars($_POST['volumePlan']); $ediTerms = htmlspecialchars($_POST['ediTermsOfService']); $ediPayment = htmlspecialchars($_POST['paymentOptions']); //Glaxis Variables $dispatch = htmlspecialchars($_POST['lynxDispatch']); $liveDate = htmlspecialchars($_POST['liveDate']); $ppgSetup = htmlspecialchars($_POST['ppgOnlineOrdering']); $glaxisTerms = htmlspecialchars($_POST['glaxisTermsOfService']); $ediMsg = "Another customer has signed up for EDI.\n\nCompany Name: $cName\nPhone: $cPhone\nFax: $fax\nAddress: $address\nCity: $city\nState: $state\nZip: $zip\nFed Tax Id: $fedTaxId\nOwners Name:$oName\neCommerce Manager: $eCommerceManager\nEmail: $email\n\nVolume Plan: $volume\nAgree to Terms: $ediTerms\nEDI Payment Type: $ediPayment\n"; $glaxisMsg = "Another Customer has signed up for Glaxis.\n\nCompany Name: $cName\nPhone: $cPhone\nFax: $fax\nAddress: $address\nCity: $city\nState: $state\nZip: $zip\nFed Tax Id: $fedTaxId\nOwners Name:$oName\neCommerce Manager: $eCommerceManager\nEmail: $email\n\nPrevious Dispatch Number: $dispatch\nLive Date: $liveDate\nPPG Setup: $ppgSetup\nAgree to Terms: $glaxisTerms\n"; switch ($_POST['serviceForm']) { case 'EDI': echo 'EDI email sent!'; //mail ("[email protected]","EDI Service request form", "$ediMsg"); break; case 'Glaxis': echo 'Glaxis email sent!'; //mail("[email protected]@mainstreetcomp.com", "Glaxis Service request form", "$glaxisMsg"); break; case 'EDI and Glaxis': echo 'EDI and Glaxis email sent!'; //mail ("[email protected]", "EDI Service request form", "$ediMsg"); //mail("[email protected]", "Glaxis Service request form", "$glaxisMsg"); break; } //tell user that form has been submitted //and to check for confirmation echo '<p align="center">'."Your form has been submitted. Check your inbox for a confirmation message.".'</p>'; } else { //if submit has not been pressed, display form ?> <html> <head></head> <body> <form name="form2" method="POST" action="<?php echo $_SERVER['PHP_SELF'] ?>"> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td>Company Name:</td> <td> <?php //if name has been filled in previously, //fill in this field if ($_POST['cName'] == true) { echo'<input type="text" name="cName" value="'.$_POST['cName'].'" />'; } else { echo'<input type="text" name="cName" />'; } ?> </td> </tr> <tr> <td>Phone Number:</td> <td> <?php if ($_POST['cPhone'] == true) { echo'<input type="text" name="cPhone" value="'.$_POST['cPhone'].'" />'; } else { echo'<input type="text" name="cPhone" />'; } ?> </td> </tr> <tr> <td>Fax Number:</td> <td> <?php if ($_POST['faxNumber'] == true) { echo'<input type="text" name="faxNumber" value="'.$_POST['faxNumber'].'" />'; } else { echo'<input type="text" name="faxNumber" />'; } ?> </td> </tr> <tr> <td>Company Address:</td> <td> <?php if ($_POST['companyAddress'] == true) { echo'<input type="text" name="companyAddress" value="'.$_POST['companyAddress'].'" />'; } else { echo'<input type="text" name="companyAddress" />'; } ?> </td> </tr> <tr> <td>City:</td> <td> <?php if ($_POST['city'] == true) { echo'<input type="text" name="city" value="'.$_POST['city'].'" />'; } else { echo'<input type="text" name="city" />'; } ?> </td> </tr> <tr> <td>State:</td> <td> <?php if ($_POST['state'] == true) { echo'<input type="text" name="state" value="'.$_POST['state'].'" />'; } else { echo'<input type="text" name="state" />'; } ?> </td> </tr> <tr> <td>Zip Code:</td> <td> <?php if ($_POST['zipCode'] == true) { echo'<input type="text" name="zipCode" value="'.$_POST['zipCode'].'" />'; } else { echo'<input type="text" name="zipCode" />'; } ?> </td> </tr> <tr> <td>Fed Tax ID:</td> <td> <?php if ($_POST['fedTaxId'] == true) { echo'<input type="text" name="fedTaxId" value="'.$_POST['fedTaxId'].'" />'; } else { echo'<input type="text" name="fedTaxId" />'; } ?> </td> </tr> <tr> <td>Owner's Name:</td> <td> <?php if ($_POST['ownersName'] == true) { echo'<input type="text" name="ownersName" value="'.$_POST['ownersName'].'" />'; } else { echo'<input type="text" name="ownersName" />'; } ?> </td> </tr> <tr> <td>E-Commerce Manager (if different from above):</td> <td> <?php if ($_POST['eCommerceManager'] == true) { echo'<input type="text" name="eCommerceManager" value="'.$_POST['eCommerceManager'].'" />'; } else { echo'<input type="text" name="eCommerceManager" />'; } ?> </td> </tr> <tr> <td>Email Address:</td> <td> <?php if ($_POST['emailAddress'] == true) { echo'<input type="text" name="emailAddress" value="'.$_POST['emailAddress'].'" />'; } else { echo'<input type="text" name="emailAddress" />'; } ?> </td> </tr> <tr> <td>What service form do you need to submit?</td> <td><select name="serviceForm" onChange="document.form2.submit();"> <option>Select One</option> <option>EDI</option> <option>Glaxis</option> <option>EDI and Glaxis</option> </select> </td> </tr> <?php //depending on what the user chose from the previous drop-down, //display appropriate fields switch ($_POST['serviceForm']) { //if user selected EDI, show these fields case 'EDI': ?> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"><strong>EDI Service Request</strong></td> </tr> <tr> <td>EDI Volume Plan:</td> <td><input name="volumePlan" type="checkbox" value="low volume" /> Low Volume (10 or less invoices/month)<br /> <input name="volumePlan" type="checkbox" value="standard volume" /> Standard Volume (10+ invoices/month) </td> </tr> <tr> <td>Do you accept the EDI Terms of Service?</td> <td><select name="ediTermsOfService"> <option>Yes</option> <option selected="selected">No</option> </select> </td> </tr> <tr> <td>How would you like to pay your monthly fees?</td> <td><select name="paymentOptions"> <option>Check (adds $10/month processing fee)</option> <option selected="selected">Direct Debit (E.F.T.)</option> </select> </td> </tr> <tr> <td> </td> <td valign="top"><input type="submit" name="submit2" value="Send Form" onClick="addon.value = 'go!';" /></td> </tr> </table> </form> </body> </html> <?php //end fields for "EDI" choice break; //if user selected Glaxis, show these fields case 'Glaxis': ?> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"><strong>Glaxis Service Request</strong></td> </tr> <tr> <td>Previous Lynx Dispatch Number:</td> <td><input type="text" name="lynxDispatch" /></td> </tr> <tr> <td>When would you like to go Live??</td> <td><input type="text" name="liveDate" /></td> </tr> <tr> <td>Would you like to setup PPG online ordering?</td> <td><select name="ppgOnlineOrdering"> <option selected="selected">Yes</option> <option>No</option> </select> </td> </tr> <tr> <td>Do you accept the Glaxis Terms of Service?</td> <td><select name="glaxisTermsOfService"> <option>Yes</option> <option selected="selected">No</option> </select> </td> </tr> <tr> <td> </td> <td valign="top"><input type="submit" name="submit2" value="Send Form" onClick="addon.value = 'go!';" /></td> </tr> </table> </form> </body> </html> <?php //end fields for "Glaxis" choice break; //if user selected EDI and Glaxis, show these fields case 'EDI and Glaxis': ?> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"><strong>EDI Service Request</strong></td> </tr> <tr> <td>EDI Volume Plan:</td> <td><input name="volumePlan" type="checkbox" value="low volume" /> Low Volume (10 or less invoices/month)<br /> <input name="volumePlan" type="checkbox" value="standard volume" /> Standard Volume (10+ invoices/month) </td> </tr> <tr> <td>How would you like to pay your monthly fees?</td> <td><select name="paymentOptions"> <option>Check (adds $10/month processing fee)</option> <option selected="selected">Direct Debit (E.F.T.)</option> </select> </td> </tr> <tr> <td>Do you accept the EDI Terms of Service?</td> <td><select name="termsOfService"> <option>Yes</option> <option selected="selected">No</option> </select> </td> </tr> <tr> <tr> <td colspan="2"> </td> </tr> <td colspan="2"><strong>Glaxis Service Request</strong></td> </tr> <tr> <td>Previous Lynx Dispatch Number:</td> <td><input type="text" name="lynxDispatch" /></td> </tr> <tr> <td>When would you like to go Live??</td> <td><input type="text" name="liveDate" /></td> </tr> <tr> <td>Would you like to setup PPG online ordering?</td> <td><select name="ppgOnlineOrdering"> <option selected="selected">Yes</option> <option>No</option> </select> </td> </tr> <tr> <td>Do you accept the Glaxis Terms of Service?</td> <td><select name="glaxisTermsOfService"> <option>Yes</option> <option selected="selected">No</option> </select> </td> </tr> <tr> <td> </td> <td valign="top"><input type="submit" name="submit2" value="Send Form" onClick="addon.value = 'go!';" /></td> </tr> </table> </form> </body> </html> <?php //end fields for EDI and Glaxis break; default: ?> </table> </form> </body> </html> <?php } } ?> now I run this, I choose a form, click send form, but nowhere do I see anything saying an email was sent. well that's weird, we expected otherwise. well if we never saw the debug echo message, that means mail() was never even called in the first place! let's trace back our steps to find out where the problem originates. well maybe something is wrong with the switch statement? maybe $_POST['serviceForm'] has no value? let's check. let's add an echo statement right before the place where $_POST['serviceForm'] is used echo 'value of serviceForm: ' . $_POST['serviceForm']; // debug switch ($_POST['serviceForm']) I run this, and I see that $_POST['serviceForm'] never equals 'EDI' or 'Glaxis'. Infact, its value is always just 'Select One'. Well we tracked down the first problem, it turns out that $_POST['serviceForm'] has a different value than we expected. That means we never know which form was chosen! See if you can figure out what can we do to tell php what form it's receiving. Possibly one way could be placing a hidden input field in each of the addon form, all having the same name, but a value that equals that of the addon form. then, when you need to determine the form, it should be the value of that hidden input field. Good luck! Quote Link to comment https://forums.phpfreaks.com/topic/141599-solved-trouble-with-mail-function/#findComment-741190 Share on other sites More sharing options...
revraz Posted January 20, 2009 Share Posted January 20, 2009 I would even step back 1 further and just verify you have the mail function setup right. Create a 1 line php file with just <?php mail ("[email protected]","EDI Service request form", "Message", "FROM:youremail.com"); ?> Replace both the TO and FROM emails to a valid email on the domain. Quote Link to comment https://forums.phpfreaks.com/topic/141599-solved-trouble-with-mail-function/#findComment-741195 Share on other sites More sharing options...
machupicchu Posted January 20, 2009 Share Posted January 20, 2009 yeah, that would be the next thing to check, but first things first Quote Link to comment https://forums.phpfreaks.com/topic/141599-solved-trouble-with-mail-function/#findComment-741218 Share on other sites More sharing options...
cooldude832 Posted January 20, 2009 Share Posted January 20, 2009 This is a side note to save you time. To sanitize your whole POST input don't do it like you did try something like <?php function input_clean($var){ return htmlspecialcharacters(trim($var)); } foreach($_POST as $key=>$value){ $post_dat[$key] = input_clean($value); } ?> You can always add additional affects to the data or you can use the supergobal $_POST to get uncleaned inputs. Quote Link to comment https://forums.phpfreaks.com/topic/141599-solved-trouble-with-mail-function/#findComment-741225 Share on other sites More sharing options...
machupicchu Posted January 20, 2009 Share Posted January 20, 2009 cooldude isn't it true that if our immune system is extremely strong we don't need to sanitize our $_POSTs? Quote Link to comment https://forums.phpfreaks.com/topic/141599-solved-trouble-with-mail-function/#findComment-741238 Share on other sites More sharing options...
cooldude832 Posted January 20, 2009 Share Posted January 20, 2009 Is that a joke? You should always sanitize it Quote Link to comment https://forums.phpfreaks.com/topic/141599-solved-trouble-with-mail-function/#findComment-741245 Share on other sites More sharing options...
revraz Posted January 20, 2009 Share Posted January 20, 2009 My post would be "first things first" since there is no point in sending variables if the mail function isn't even enabled. yeah, that would be the next thing to check, but first things first Quote Link to comment https://forums.phpfreaks.com/topic/141599-solved-trouble-with-mail-function/#findComment-741376 Share on other sites More sharing options...
machupicchu Posted January 20, 2009 Share Posted January 20, 2009 My post would be "first things first" since there is no point in sending variables if the mail function isn't even enabled. Once we get the basic functionality that we need, then we can work on the mail() function, and on enabling it if it's not enabled. He never even got to test it because his code wasn't even reaching the function. My opinion was to fix that first. I think it shouldn't be a question of "is my mail() enabled?" but "do I want to send mail?" and if mail() is not doing anything then then make it send mail. It comes down to opinion and programming style of what should be fixed first. @MainStWebGuy if your server is running Linux it should already have mail() configured. Quote Link to comment https://forums.phpfreaks.com/topic/141599-solved-trouble-with-mail-function/#findComment-741396 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.