i would like some help please in sending the data of a form to an email address. i have the form submitting to a database. i also want the form info sent to an email address. the problem is that i am on a windows server using wamp. from resaearch i gather i have to put a username and password somewhere for the mail to be sent as this is whats required. i am not sure where to put this information. also the username and pasword of what exactly? i have gone into the php.ini file and edited the lines that pertain to sending mail. i have class.phpmailer.php and mail.in.php all in place. each time i fill out the form it populates the database but does not send the email.
any help please
this is my code to send the contents of the form in an email
$mail = new MyMailer;
$yourEmail = 'danny@dcobbinah.co.uk';
$mail->AddAddress($_POST['email'].",$yourEmail");
$mail->Subject = "Thank you";
$mail->Body = "This is what you submitted:
Organisation Name: ".($_POST['name'])."
Address: ".($_POST['address'])."
Telephone Number: ".($_POST['pcode'])."
Email Address: ".($_POST['email'])."
Date of party: ".($_POST['terms'])."/".($_POST['specialoffers'])."/".($_POST['newsletter'])."
Regards,
MEEEE";
//$mail->AddAttachment("buildingdoctorsbrochure.zip", "buildingdoctorsbrochure.zip"); // optional name
if(!$mail->Send())
{
echo "There was an error sending the message";
exit;
}