View Single Post

  #4 (permalink)  
Old 09-05-2004
Robert Dayton
 
Posts: n/a
Default Re: e-mail contents of mysql databse NOT

You could also try:

1) ob_start();

2) echo your table out in html

3) $contents = ob_get_contents();

4) ob_end_clean();

5) $filename="/path/file.html"; $fp=fopen($filename,"w");

6) fputs($fp, $contents); fclose($fp);

7) passthru("htmldoc -f attachment.pdf --left .75in --right .75in --top
..2in --bottom .2in --linkstyle plain --linkcolor black --footer . --webpage
$filename");

8) Use Mutt to mail it out:
passthru("/usr/local/bin/mutt -F /path/to/mutt/conffile/muttrcconffile -a
/path/attachment.pdf -s \"Email From You\" $emailaddress <
/path/emailbodytext.txt");

Then your client gets his email in a pdf attachment! htmldoc will let you
embed links into that pdf, too.


Reply With Quote