infatti Posted April 18, 2007 Share Posted April 18, 2007 Hello. I am a newbie and have a site that I am fixing that was already built. I have a contact us form on a php page that is receiving an error everytime it is sent. There was a new user added to the database recently, replacing the original, that may be related to our issues. There is an error message received everytime the user tries to send the contact us form. Below is error message: EMAIL_FAILED Title: Mail server issues Date: 05-13-2005 Solution: There are several solutions to this issue, depending on the server scripting language that you are using: 1. For PHP there are two sets of mail server configuration: in the php.ini configuration file, that resides in PHP's main folder, and in the InterAKT Control Panel> Mail server settings. The following cases may occur: * If the Control Panel >Mail server settings are not set, but the mail server is correctly configured in php.ini, sending messages will work fine. * If the php.ini file does not contain mail server settings, you must specify them in the InterAKT Control Panel > E-mail Settings (the server name, port, username and password). * If mail server settings exist both in the php.ini file and in the Control Panel > E-mail settings, the ones in InterAKT Control Panel have a higher priority. 2. For the ColdFusion server model, the behavior is similar to the PHP case, stated above. The only difference lies in the fact that system e-mail settings are no longer stored in the php.ini file, but are set through the ColdFusion Administrator > Server Settings > Mail. 3. For the ASP server model, it is mandatory that you specify the mail server settings in the E-mail settings section of the Control Panel, or sending messages will not work at all. --- Any ideas? Quote Link to comment Share on other sites More sharing options...
Maverickb7 Posted April 18, 2007 Share Posted April 18, 2007 It would probably help everyone alot more if you showed the actually code being used. Then maybe someone could pin point whats going wrong for you. Quote Link to comment Share on other sites More sharing options...
infatti Posted April 18, 2007 Author Share Posted April 18, 2007 Here is the contact us page code: <?php require_once('Connections/BFsite.php'); ?> <?php // Load the common classes require_once('includes/common/KT_common.php'); // Load the tNG classes require_once('includes/tng/tNG.inc.php'); // Make a transaction dispatcher instance $tNGs = new tNG_dispatcher(""); // Make a transaction dispatcher instance $tNGs = new tNG_dispatcher("/"); // Make unified connection variable $conn_BFsite = new KT_connection($BFsite, $database_BFsite); // Start trigger $formValidation = new tNG_FormValidation(); $formValidation->addField("First_Name", true, "text", "", "", "", ""); $formValidation->addField("Viewer_Producer", true, "text", "", "", "", ""); $formValidation->addField("Phone", false, "text", "phone", "", "", ""); $formValidation->addField("Email", true, "text", "email", "", "", ""); $formValidation->addField("Comments", true, "text", "", "", "", ""); $tNGs->prepareValidation($formValidation); // End trigger //start Trigger_SendEmail trigger //remove this line if you want to edit the code by hand function Trigger_SendEmail(&$tNG) { $emailObj = new tNG_Email($tNG); $emailObj->setFrom("webmaster@turnermediagroup.com"); $emailObj->setTo("StefaniaA@turnermediagroup.com"); $emailObj->setCC("{Email}"); $emailObj->setBCC(""); $emailObj->setSubject("B&F Contact Form"); //WriteContent method $emailObj->setContent("First Name:\n{First_Name}\n\nLast Name:\n{Last_Name}\n\nViewer/Producer:\n{Viewer_Producer}\n\nAddress:\n{Address}\n\nCity/State/ZIP:\n{City_State_Zip}\n\nPhone:\n{Phone}\n\nEmail:\n{Email}\n\nComments:\n{Comments}\n\n"); $emailObj->setEncoding("ISO-8859-1"); $emailObj->setFormat("Text"); $emailObj->setImportance("Normal"); return $emailObj->Execute(); } //end Trigger_SendEmail trigger ?> <?php // Make a custom transaction instance $customTransaction = new tNG_custom($conn_BFsite); $tNGs->addTransaction($customTransaction); // Register triggers $customTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Custom1"); $customTransaction->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation); $customTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "contactus_thanks.php"); $customTransaction->registerTrigger("AFTER", "Trigger_SendEmail", 40); // Add columns $customTransaction->addColumn("First_Name", "STRING_TYPE", "POST", "First_Name"); $customTransaction->addColumn("Last_Name", "STRING_TYPE", "POST", "Last_Name"); $customTransaction->addColumn("Viewer_Producer", "STRING_TYPE", "POST", "Viewer_Producer"); $customTransaction->addColumn("Address", "STRING_TYPE", "POST", "Address"); $customTransaction->addColumn("City_State_Zip", "STRING_TYPE", "POST", "City_State_Zip"); $customTransaction->addColumn("Phone", "STRING_TYPE", "POST", "Phone"); $customTransaction->addColumn("Email", "STRING_TYPE", "POST", "Email"); $customTransaction->addColumn("Comments", "STRING_TYPE", "POST", "Comments"); // End of custom transaction instance ?> Quote Link to comment 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.