Mail sending failed

the mail() function

Moderators: egami, macek, gesf

Post Reply
LadyKYra
New php-forum User
New php-forum User
Posts: 9
Joined: Tue Feb 07, 2012 9:36 pm

Fri Apr 06, 2012 3:16 am

Hello sunny, I dont hve much time to read ur codes. You can check this out, it is an example from w3school
Idk if this will clear out things, but it can help. xD
<?php
$to = "somebody@example.com, somebodyelse@example.com";
$subject = "HTML email";

$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<p>This email contains HTML Tags!</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
</body>
</html>
";

// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";

// More headers
$headers .= 'From: <webmaster@example.com>' . "\r\n";
$headers .= 'Cc: myboss@example.com' . "\r\n";

mail($to,$subject,$message,$headers);
?>

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests