Jump to content

Recommended Posts

Posted

When using basic WireMail I'm looking for a way to convert the HTML message to a plain text version while keeping line breaks.

For example, I want:

<h1>She sells seashells</h1>
<p>On the sea shore.</p>

...to become...

She sells seashells
On the sea shore.

I thought one of the sanitizer methods might help out here and I've tried a few things with the "newlineReplacement" option for $sanitizer->textarea but no luck yet.

Any suggestions?

Posted

Solved now - $sanitizer->textarea works just fine with no options needed. I just couldn't see the line breaks because I put the plain text message in WireMail's bodyHTML. :-[

  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...