Help converting BR to newlines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
im developing a membership system, which emails new users some info.
THAT info has HTML on it (im using phpMailer to handle the email
sending).

With phpMailer i can do this:
$mail->Body    = $html;
$mail->AltBody = plain($html);

So, every member that has an email-client that supports HTML, will get
the $html, and those that use an email client that handle text-only
emails will get the plain($html).

My problem is at the plain() function. I need to accomplish this:
* Replace the BR tag with newlines (\n) so that all new lines show in
text-only email clients as well.

Further considerations:
* The BR tag can be <br>, <br />, <br/>, etc.. so ill need a proper
preg_replace there

This is my plain() function so far:
function plain($data) {
 return strip_tags($data);
}

Thanks in advance,
Andres

-- 
Slds,
Andrés Santos Kunze, IIG
(593) 9 7026627


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux