SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2014
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Include HTML tags Between <<<EOD .......EOD;

    I am trying to add some design to contents which are in between <<<EOD ......EOD; php script.
    following is my code :
    Code PHP:
    <?php
    $emailSubject='Subject Goes Here';
    $to=("me@myemailaddress");
    //$to1=("another@theiremailaddress");
    //$to2=("athird@anotheremailaddress");
    $name1=$_POST['name'];
    $number1=$_POST['number'];
    $email1=$_POST['email'];
    $hear1=$_POST['hear_about'];
    $message1=$_POST['mess'];
    $type1=$_POST['type'];
    $place1=$_POST['wedding_place'];
    $guest1=$_POST['guest'];
    $mdate1=$_POST['mdate'];
     
     
    $body =<<<EOD
    Name:$name1
    Name: $name1 
    Number: $number1
    Email: $email1 
    How did you hear about us: $hear1 
    Message: $message1 
    Type of Photography:$type1
    Wedding Venue:$place1
    Number of Guests:$guest1
    Date Of Wedding:$mdate1
    EOD;
     
     
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    //$headers .= 'Bcc: other-email-addresses' . "\r\n";
    $headers = "From: $email1";
    $success = mail($to,$emailSubject,$body,$headers);
    //$success = mail($to1,$emailSubject,$body,$headers);
    //$success = mail($to2,$emailSubject,$body,$headers);
    if($success==true)
    {
    	header("location:thankyou.html");
    }
     
    ?>



    this script will send an email, I want this email to be designed more than just plain text..

    Can Anyone help Please?
    Many Thanks In Advance
    Last edited by TechnoBear; Mar 4, 2014 at 06:06. Reason: E-mails/identifying info removed & PHP tags added

  2. #2
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,268
    Mentioned
    116 Post(s)
    Tagged
    1 Thread(s)
    I'm not sure what you're asking, but if you're asking how to code it, you can look at this article.

    It's an older SP article, but a lot of it is still true....http://www.sitepoint.com/code-html-email-newsletters/
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style
    Learn how to be ready for The Forums' Move to Discourse


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •