Reply to Re: [PHP] Sending a Table Via mail

Your name:

Reply:


Posted by PartyPosters on 03/24/05 00:10

Great thanks! Sorry I didn't realise it was in there.

what I've got so far is the following, I want to include a variable in there
but have tried different combos but can't get it to work reading the
variable.



$to = add@add.me.co.uk

# subject of message
$re = "Test Email from system";
$tablecontent = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01
Transitional//EN'
'http://www.w3.org/TR/html4/loose.dtd'><html><head><title>Untitled
Document</title></head><body><TABLE><TR><TD>hello</td></TR></TABLE></body></
html>";
#message from the form
$msg = $tablecontent;

$message = '
<html>
<head>
<title>Birthday Reminders for August</title>
</head>
<body>
<p>Here are the birthdays upcoming in August!</p>
<table>
<tr>
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
</tr>
<tr>
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
</tr>
<TR>
<TD>"$username"</TD>
</TR>

</table>
</body>
</html>
';



// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";



# send the mail now
mail($to, $re, $message,$headers);
########### MAIL ENDS HERE
?>



----- Original Message -----
From: "John Nichel" <john@kegworks.com>
To: <php-general@lists.php.net>
Sent: Wednesday, March 23, 2005 9:37 PM
Subject: Re: [PHP] Sending a Table Via mail


> PartyPosters wrote:
> > Hello is there any way I can send a table (or just tabulated data) via
email.
> > I've tried this but comes up with an error.
> > $to = myemail@address.com;
> >
> > $re = "Test Email from system";
> >
> > $msg = "<TABLE BORDER=\"2\"><TR>hello</TR></TABLE>"
> >
> >
> > mail($to, $re, $msg);
>
> It's in the manual...
>
> http://us4.php.net/manual/en/function.mail.php
>
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> john@kegworks.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация