Jump to content

PHP Mailer with a form


crazylegseddie

Recommended Posts

Hi i have created a simple contact form thats works fine using my smtp set up in my php.ini file. I now need to put my work on a live server and have downloaded and setup phpmailer. My form currently works using the following code:

[code]
<?php
//create short variable names
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$email=$_POST['email'];
$feedback=$_POST['feedback'];
$toaddress = 'hipbobbiter@hotmail.com';
$subject = 'Contact';
$mailcontent = 'Customer First Name: '.$firstname. "\n"
  .'Customer Last Name: '.$lastname. "\n"
  .'Customer Email: '.$email. "\n"
  ."Customer Comments: \n".$feedback. "\n";
$fromaddress = 'From: admin@whitedisc.com';

mail($toaddress, $subject, $mailcontent, $fromaddress);


?>
[/code]

How can i integrate this into phpmailer? Ive looked at the tutorial using the site but still having problems. Any help will be cool :)

THX
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.