Jump to content

aslanandbeez

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

aslanandbeez's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Okay I'm doing the whole email form thing on my site, and I want the name and email address from the form to go into the header, here's my code <?php $to = 'culturaldissection@hotmail.com'; $name = $_POST['name']; $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; $headers = 'From: $name $email' . "\r\n" . 'Reply-To: $email' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); echo "Your message has been sent, thank you"; ?> Also I'm hoping to adapt this for an e-card service, so would I have to put the selected card and a message into a function called $content for instance then do something like; $message = '$content'; or am I on completely the wrong track?
  2. I've tried to run a test page in phpmailer, I have entered the SMTP address but get this error address; Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/jbaker/public_html/class.smtp.php on line 105 Warning: fsockopen() [function.fsockopen]: unable to connect to mail.jonathonbaker.exofire.net :25 (Unknown error) in /home/jbaker/public_html/class.smtp.php on line 105 Message was not sent.Mailer error: Language string failed to load: connect_host here's the test page; <?php require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "mail.jonathonbaker.exofire.net "; // SMTP server $mail->From = "aslanandbeez@yahoo.co.uk"; $mail->AddAddress("aabwebdesign@gmail.com"); $mail->Subject = "First PHPMailer Message"; $mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer."; $mail->WordWrap = 50; if(!$mail->Send()) { echo 'Message was not sent.'; echo 'Mailer error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent.'; } ?> what is it I am doing wrong? Do you need the files class.phpmailer.php and class.smtp.php
  3. does anybody know of any tutorials of how to use phpmailer with gmail?
  4. Hey, I have cobbled together some code to store peoples detailsd and send me an email with said deteils, but I'm not getting the email so here's the code, what am I doing wrong? (I've left our the password for obvious reasons <?php $firstName = strip_tags(trim($_POST['first_name'])); $lastName = strip_tags(trim($_POST['last_name'])); $email = strip_tags(trim($_POST['Email'])); $message = strip_tags(trim($_POST['Message'])); $db_name="jonbak0_db"; $db_username="jonbak0_db"; $db_server="mysql4.freehostia.com"; $db_password=""; $sql = "INSERT INTO emailSignup (firstName,lastName,email,message) VALUES ('$firstName','$lastName','$email','$message')"; mysql_query($sql); $to = "culturaldissection@hotmail.com"; $message = $_POST["Message"]; $messagesent = "From: $email Message: $message"; $from = $_POST["Email"]; $headers = "e-mail sign up from: $from"; mail($to,$messagesent,$headers); echo "Your details have been sent, thank you."; ?>
  5. Thanks alot this is all helping me
  6. not a great deal, i'm just learning PHP from a dummies book, and i've started going into an O-Reilly book, but before I start using examples, it seems a bit terrifying to put together myself
  7. Hey, I'm planning oh having some e-cards on a site, the idea is someone picks one of four designs maybe with a radio or checkbox and fills in their name and email address and the recipient's email address and name which along with the picture and a message get sent to them. I have a vague idea about some of the aspects, but can anybody point me in the righ direction of what i might need to do, or better yet a kind of tutorial? Anybody helping me will earn some serious karma points
  8. I need to create an e-card service for a website for a bar that I'm creating, can anybody point me to any good third-party scripts, or tutorials?
×
×
  • 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.