Reply to Re: [SMARTY] send smarty-display as email

Your name:

Reply:


Posted by DC on 09/30/04 11:28

NOTE: bug in Pear::MIME class that lets you call the headers() method
but overrides it with initial parameters rather than the ones you send.

see:

http://pear.php.net/bugs/bug.php?id=2952

for some patches. developer refuses to recognize this as a bug even
after 10 months of multiple reports and logical arguments.

dc

Daniel Hedrick had written:
> On Oct 4, 2005, at 8:40 AM, Holger Wöhle wrote:
>
>> Can i change the direction of smarty->display to a handle or a
>> variable wich
>> i can then send through mime-enconding and smtp ?
>
>
> Instead of that, use smarty->fetch(...), as in this example that uses
> PEAR's Mail:mime, below:
>
> $msg = new Mail_mime( "\n" );
> $msg->setTXTBody( $smarty->fetch( "/path/to/myTextTemplate.tpl.txt" );
> $msg->setHTMLBody( $smarty->fetch( "/path/to/myHTMLTemplate.tpl.html" );
> $body = $msg->get();
> $hdrs = $msg->headers( $myheaders );
> $mail =& Mail::factory( 'mail' );
> $mail->send( $msg_recipient, $hdrs, $body );
>
> HTH,
> -daniel
> --
> http://www.hedrick.org/daniel?sig
>
>
>

[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

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