PhpMailer help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

PhpMailer help

Post by mhouldridge »

Hi,

I am using phpmailer to process my contact form.

I have multiple text fields which I need to insert in to the email's body content.

.... here is the mailform.php

Code: Select all

<?php 
// Grab our config settings 
require_once ("e:/grd/config.php"); 

// Grab the FreakMailer class 
require_once ("e:/grd/lib/MailClass.inc"); 

// instantiate the class 
$mailer = new FreakMailer(); 

// Set the subject 
$mailer->Subject = 'GRD Customer Enquiry'; 

// Body 
$mailer->Body = 

$_POST['title']; 

// Add an address to send to. 
$mailer->AddAddress('something@email.com', 'Enquiries'); 

if(!$mailer->Send()) 
{ 
  echo 'There was a problem sending this mail!'; 
} 
else 
{ 
  echo 'Mail sent!'; 
} 
$mailer->ClearAddresses(); 
$mailer->ClearAttachments(); 
?>
I need to add further elements where the $_POST['title']; part is... I have tried already however the first post is the only one use.d.

Please hep.
User avatar
chrys
Forum Contributor
Posts: 118
Joined: Tue Oct 04, 2005 9:41 am
Location: West Roxbury, MA (Boston)

Post by chrys »

Could you be more specific?
Post Reply