T4VN is an online PHP Help community that provides PHP Tutorials, PHP Examples, PHP Scripts, PHP Support
    HOME  |  HOSTING COUPON  |  TEMPLATE  |  PHP SCRIPTS  |  LINK TO US  |  LINK  |  REGISTER | CONTACT
::: Member Login :::
 Username
 Password
 
Forgot your password ?
::: PHP Tutotal :::
  PHP Basic (7)
  PHP Advanced (4)
  PHP Database (2)
  Coding Step By Step (8)
  PHP and AJAX (0)
::: PHP Example :::
  Arrays (1)
  Code Highlighters (3)
  Database Functions (12)
  Date & Time (5)
  E-Mail (6)
  Forms (5)
  Guestbooks (1)
  Logging (2)
  Miscellaneous (10)
  Password Generators (3)
  Randomizers (3)
  String Manipulation (10)
  User Authentication (6)
::: Search On T4VN :::
::: T4VN Statistics :::
  PHP Scripts : 64
  PHP Example : 67
  PHP Tutorials : 21
  PHP News : 93
  Total Coupon : 36
  Other Tutorials :
  Member : 215
  Visitor Online : 1
  Today Visit: 304
  Total Visitor : 301326
  Most Online : 41
::: Sponsored Links :::

PR 4 For This Webpage

Vinaora Logo
Home Today :

Sending HTML email

Author : GesF

Just a simple code to show you how to send an HTML email!

PHP Example :

<?php 
// Recipients. You can send it to more than 1 person! 
$to "you1 <you@yoursite.com>" ", " // note the comma 
$to .= "you2 <you2@yoursite.com>"

// This is the email subject 
$my_subject "My first HTML message!"

// Message 
$my_message 
<html> 
<head> 
<title>My first HTML message!</title> 
</head> 
<body> 
<table> 
<tr> 
<td>Hi! Just to say i can now send html mail :p</td> 
</tr> 
<tr> 
<td>Do you like it!? C ya</td> 
</tr> 
</table> 
</body> 
</html> 
'


// To send HTML mail, you can set the Content-type header. 
$my_headers "MIME-Version: 1.0rn"
$my_headers .= "Content-type: text/html; charset=iso-8859-1rn"

// Setting additional headers 
$my_headers .= "From: HTML mail <example@example.com>rn"

$my_headers .= "Cc: example@example.comrn"
$my_headers .= "Bcc: example@example.comrn"

// And now mail it! 
mail($to$my_subject$my_message$my_headers); 
?>


Other Example


::: Resources :::
  Links Directory
  Programming 2 3
  Webmaster 2 3
  Web Design 2 3
  Web Hosting 2 3
  Other Links 2 3
  Asian ShowBiz News
  Teach Seo For You
::: New Templates :::




::: Other Tutorials :::
 Program Design

  Powered By T4VN.NET - Version 2.0 - CopyRight © T4VN.NET 2005-2007