Jump to content

Wiremail problem with charset and german umlauts


Juergen
 Share

Recommended Posts

@BitPoet I found the solution for long subjects. Please use the function mb_encode_mimeheader for that.
So line 435 in WireMail.php should read

if (@mail($to, mb_encode_mimeheader($this->subject), $body, $header, $param)) $numSent++;

Now the long subject is separated into multiple lines and each one is correctly wrapped with the correct code.

  • Like 1
Link to comment
Share on other sites

@jmartsch: I had this already in the back of my mind, but since PW doesn't enforce the precense of the mbstring extension in the installer, I want to tackle this problem with a viable fallback for non-mbstring systems. Assembling a failsafe wrapping solution without mbstring is a delicate subject though, so I want to give any code I propose a really thorough testing.

I'm trying to get another pull request for WireMail out in the next few days. That patch will also have proper nesting of multipart types so that the HTML is rendered in all clients (especially Outlook) when attachments are present. Currently, some ignore the HTML in favor of the text part since all parts are treated equal in multipart-mixed.

  • Like 1
Link to comment
Share on other sites

14 hours ago, BitPoet said:

I'm trying to get another pull request for WireMail out in the next few days. That patch will also have proper nesting of multipart types so that the HTML is rendered in all clients (especially Outlook) when attachments are present. Currently, some ignore the HTML in favor of the text part since all parts are treated equal in multipart-mixed.

@BitPoet Do you have an estimate when you can add the fix for multipart? Because I have attachments and now my email client renders both, the text mail part and the html mail part (see screenshot).

Maybe a small donation from me may motivate you to do it quickly? I don´t want to go back to PHPMailer again.

multipart-message.png

Link to comment
Share on other sites

So there's good news and bad news, as I'm almost done testing. The good news is that I'll be able to wrap up the content nesting code some time tonight. The bad news is that fixing the problem of subject lines > 76 characters is basically impossible, since PHP's mail() function messes up all attempts at wrapping the subject header, mb_encode_mimeheader or not, on my system. This is likely a Windows oddity, but it's reproducible across PHP versions. Strike the bad part, fooled myself there. So chances are high there'll be a working, thoroughly tested git branch by this time tomorrow.

  • Like 7
Link to comment
Share on other sites

  • 1 year later...

Sorry for re-opening this old thread, but I'd like to ask if there is some option planned to select the now enforced quoted printable UTF-8 decoration into something else? Some GMX screensaver app seems to have problems decoding the quoted printable string but works nicely when I modify quotedPrintableString in WireMail to use base64_encode.

I'm totally aware of the benefits from quoted printable over base64 encoding, but for the subject I'd indeed prefer to stay with plain ascii if encoding is not necessary at all.

Link to comment
Share on other sites

On 4/26/2018 at 5:31 PM, Autofahrn said:

Sorry for re-opening this old thread, but I'd like to ask if there is some option planned to select the now enforced quoted printable UTF-8 decoration into something else? Some GMX screensaver app seems to have problems decoding the quoted printable string but works nicely when I modify quotedPrintableString in WireMail to use base64_encode.

There's an issue with from headers that I still have on the back burner, so I'll take a look at encoding options when I tackle that. Might be a few weeks though, as I'm up to my neck in work since we switched ERP systems at my workplace yesterday.

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

Hi Guys,

I've read all the info in this thread but since half is about the umlaubt and half about the content type I can't realy figure out if and how this was solved.

This is what I get out of WireMail:

Content-Type: text/html; charset="utf-8"

Content-Transfer-Encoding: 8bit



<p>Beste Bram,<br /><br />
Er is een account voor je aangemaakt op: portal.bewakingsgroep.nl<br /><br />
Je gebruikersnaam is: brammus<br />
Je wachtwoord is: 2c9c3s2EgAm4<br /><br />
Na het inloggen zal je gevraagd worden een nieuw wachtwoord op te geven.<br />
Onthoud dit wachtwoord goed en deel het met niemand.<br /><br />
Vriendelijke groet,<br />
Tonny Jacobs<br /><br />
Bewakingsgroep.nl</p>

Does anyone know how to fix this? I've already tried the suggested updates to WireMail and the version from the repository to no avail :\

Thanks in advance!
 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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