Results 1 to 4 of 4

Thread: whats the skinny on html in email?

  1. #1
    Join Date
    Apr 2007

    whats the skinny on html in email?

    Hello, just trying to put html in an email so it will read my href link. Its sending to the email but its showing all this as is instead of reading the html code. Anyone see whats wrong with this html email php? Thanks very much.

    PHP Code:
    $validateemail 'anemail@address.com ;
    $from = '
    $subject = "Email validation" ; 
    $messageproper = "<html>
    <title>HTML email</title>
    <div><span style='
    font-family:arial,sans-serif;font-size:14px'>Testing text and html in an email.<a href='http:www.example.com/validate.php?username=$username
    ' target='blank'>Validate Your Email</a></span></div>
    $headers = "MIME-Version: 1.0" . "\r\n";
    $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
    $headers = "From: <$from>\r\n";
    $headers .= "Reply-To: ".preg_replace('
    /[rn]+/', ' ', $from)."\r\n";
    mail($validateemail, $subject, $messageproper, $headers); 
    Last edited by vortexer; 08-12-2007 at 04:26 AM.

  2. #2
    Join Date
    Aug 2004
    Don't know if this would be causing the problem you are seeing, but you left out the "//" after the "http:" in the link tag.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

  3. #3
    Join Date
    Apr 2007
    Thanks. no its not that I just did that for this forum to keep the url tags off of it. Anyone know how put html in an email? Thanks.

  4. #4
    Join Date
    Apr 2007
    I got it, I was missing the periods after some of the $headers

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles