Jump to content

help! oh em gee


acidglitter

Recommended Posts

Use the code i have provided you have to set the headers to get the mail to send proper html formated text ok.

[code]
<?php
$to      = 'nobody@example.com';
$subject = 'the subject';
$message = '<b>put you code here ok</b>';
$headers =  'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>
[/code]
Link to comment
Share on other sites

If you are going to send html in the email then you might want to use something like this.

[code]
<?php
$to = "someone@something.com";
$subject = "Something";
$message = "<html>
<head><title>Something</title></head>
<body>
<table width="600">
  <tr>
    <td>You can put something<b>here</b></td>
  </tr>
</table>
</body>
</html>";

$knownsender = "you@yoursite.com";//make sure that this an email address that is known to the server
$headers = "FROM: $knownsender\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: multipart/alternative;\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Content-Transfer-Encoding: 7bit";
$headers .= "\r\n";

if (mail($to, $subject, $message, $headers)) {
  echo "Your mail was sent to $to";
}else{
  echo "Unable to send the message";
}     
?>[/code]

Also, it is important to rember that you should keep the width of your tables to no more then 600.

Good Luck,
Tom
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.