cvs: pear /Mail_Mime/2.0 MimePart.php

From: Date: Mon, 03 Feb 2003 20:06:02 +0000
Subject: cvs: pear /Mail_Mime/2.0 MimePart.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-8707@lists.php.net to get a copy of this message
richard Mon Feb 3 15:06:02 2003 EDT Modified files: /pear/Mail_Mime/2.0 MimePart.php Log: Lose example code Index: pear/Mail_Mime/2.0/MimePart.php diff -u pear/Mail_Mime/2.0/MimePart.php:1.1 pear/Mail_Mime/2.0/MimePart.php:1.2 --- pear/Mail_Mime/2.0/MimePart.php:1.1 Mon Feb 3 14:59:04 2003 +++ pear/Mail_Mime/2.0/MimePart.php Mon Feb 3 15:06:02 2003 @@ -260,44 +260,4 @@ return str_replace('=0D=0A', "\r\n", $output); } } // End of Mail_MimePart - -if (basename($_SERVER['PHP_SELF']) == 'Mail_MimePart.php') { - // Example code - $text = new Mail_MimePart(); - $text->addHeader('Content-Type', 'text/plain'); - $text->setBody('This is some text'); - - $html = new Mail_MimePart(); - $html->addHeader('Content-Type', 'text/html'); - $html->addHeader('Content-Transfer-Encoding', MAIL_MIMEPART_QPRINT); - $html->setBody('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> - <HTML><HEAD> - <META http-equiv=Content-Type content="text/html; charset=windows-1252"> - <META content="MSHTML 6.00.2600.0" name=GENERATOR> - <STYLE></STYLE> - </HEAD> - <BODY bgColor=#ffffff> - <DIV><FONT face=Arial size=2>Hi</FONT></DIV> - <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> - <DIV><FONT face=Arial size=2>Accomadation is booked.... Transfer 70 squids into - same account as before.&nbsp; Flight money&nbsp; - give us at end of feb as - agreed.. All thats left is boarding lessons Do you want to do private betweeen - the two of us or a group course - prob cheeper. I will look into prices oh and - insurance.</FONT></DIV> - <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> - <DIV><FONT face=Arial size=2>Janine x</FONT></DIV></BODY></HTML>'); - - $mixed = new Mail_MimePart(); - $mixed->addHeader('From', 'richard@phpguru.org'); - $mixed->addHeader('Content-Type', 'multipart/alternative'); - - $mixed->addSubPart($text); - $mixed->addSubPart($html); - - $result = $mixed->encode(); - - - //mail('richard@phpguru.org', 'test', $result['body'], implode("\n", $result['headers_i'])); - pd(implode(MAIL_MIMEPART_CRLF, $result['headers_idx']) . MAIL_MIMEPART_CRLF . MAIL_MIMEPART_CRLF . $result['body']); -} ?>

« previous php.pear.cvs (#8707) next »