Jump to content

Desperately need help with configuring a PHP mailer script


goodrichdesigns

Recommended Posts

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@email.com";  // SMTP username

 

$mail->Password = "password"; // SMTP password

 

$mail->From = "paul@salsasquad.com";

 

$mail->FromName = "SALSA SQUAD";

 

$mail->AddReplyTo("paul@salsasquad.com");

 

$mail->AddAddress("christian@goodrichdesigns.co.uk");

 

$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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.