goodrichdesigns Posted November 28, 2007 Share Posted November 28, 2007 Hi all, could someone please help me I have spent the last six hours trying to get PHP Mailer to work on a Brinkster hosted web site but with no luck! I usually handle okay with PHP but I just can't figure this one out. Go here http://www.salsasquad.com/contact_salsa_gloucester.php This is a web site I did for a client and currently the form appears to function and re-directs the user to a 'Thank You' however I can't figure out what I need to put into the action file in order to get the inputted information displayed in the form that appears in my inbox. Common problem with forms I know. Here is the script of the action file: <?php require("/sites/pima1/paulthealey/home/includes/class.phpmailer.php"); $mail = new PHPMailer(); $mail->SetLanguage("en", "/sites/pima1/paulthealey/home/includes/language/phpmailer.lang-en.php"); $mail->IsSMTP(); // set mailer to use SMTP $mail->Host = "sendmail4.brinkster.com;smtp7.brinkster.com"; // specify main and backup server $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "[email protected]"; // SMTP username $mail->Password = "password"; // SMTP password $mail->From = "[email protected]"; $mail->FromName = "SALSA SQUAD"; $mail->AddReplyTo("[email protected]"); $mail->AddAddress("[email protected]"); $mail->IsHTML(true); $mail->Subject = "This better bloody work."; $mail->Body = "Yes I hope so."; if(!$mail->Send()) { echo 'Failed to send mail'; } else { echo 'Mail sent'; } ?> Here is the code that is included on the page that has the contact form: <form action="sendContact.php" method="post" id="contactForm" onsubmit="return validate(this,'email','name,email');" /> <table cellspacing="0" cellpadding="2"> <tr> <td><label for="name">Name:</label></td> <td><input name="name" type="text" id="name" size="20" /></td> </tr> <tr> <td>E-mail:</td> <td><label for="address"><input name="address" type="text" id="address" size="20" /></label></td> </tr> <tr> <td>Enquiry:</td> <td><textarea name="enquiry" cols="28" rows="8" id="enquiry"></textarea></td> </tr> <tr> <td> </td> <td><input type="submit" name="submit" id="submit" value="Submit" /> <input type="reset" name="RESET2" id="RESET2" value="Reset" /> </form> Now this all sends the information from sendContact.php to my inbox fine however I need to include information that captures the Name, E-mail and Enquiry form fields that are included on the http://www.salsasquad.com/contact_salsa_gloucester.php. Could someone please help me Link to comment https://forums.phpfreaks.com/topic/79338-desperately-need-help-with-configuring-a-php-mailer-script/ Share on other sites More sharing options...
unidox Posted November 29, 2007 Share Posted November 29, 2007 use the mail() function. www.php.net Link to comment https://forums.phpfreaks.com/topic/79338-desperately-need-help-with-configuring-a-php-mailer-script/#findComment-401690 Share on other sites More sharing options...
MadTechie Posted November 29, 2007 Share Posted November 29, 2007 you need to pass the requests ie $mail->Body = $_POST['enquiry']; //etc Link to comment https://forums.phpfreaks.com/topic/79338-desperately-need-help-with-configuring-a-php-mailer-script/#findComment-401706 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.