Jump to content
Juergen

Wiremail problem with charset and german umlauts

Recommended Posts

@BitPoet I just edited my post. It has to do with the length of the title. Because my title was more than 78 chars.

Share this post


Link to post
Share on other sites

@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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

@jmartsch

Quote

Do you use the WireMail Class from dev Repository with bitpoets fixes?

yes I use the latest dev 3.0.36 where Ryan has included Bitpoets code changes.

Share this post


Link to post
Share on other sites

Just to clearify:

It only happens if I use

$mail->bodyHTML

If I use

$mail->body

everything is ok.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
1 hour ago, jmartsch said:

Cool. You´re supercool!

Well, you haven't tried what I did to the code yet ;)

But if you want, just grab the newest WireMail.php here. It would be great if you could give me some feedback.

  • Like 1

Share this post


Link to post
Share on other sites

It just worked :) E-Mail looks fine. Umlauts work correct and the attachment is correct.

Zwischenablagebild (2).png

  • Like 2

Share this post


Link to post
Share on other sites

That's great to hear. Thanks for testing!

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, BitPoet said:

That's great to hear. Thanks for testing!

I do some more testing with different settings and report back.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

@Autofahrn, have you tried out one of the WireMail-ThirdPartyModules?

 

 

 

 

 

 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Didn't considered alternatives yet, since WireMail basically works ok for me .

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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!
 

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...