dotnetic Posted October 17, 2016 Share Posted October 17, 2016 @BitPoet I just edited my post. It has to do with the length of the title. Because my title was more than 78 chars. Link to comment Share on other sites More sharing options...
dotnetic Posted October 17, 2016 Share Posted October 17, 2016 @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. 1 Link to comment Share on other sites More sharing options...
BitPoet Posted October 17, 2016 Share Posted October 17, 2016 @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. 1 Link to comment Share on other sites More sharing options...
Juergen Posted October 17, 2016 Author Share Posted October 17, 2016 @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. Link to comment Share on other sites More sharing options...
adrian Posted October 17, 2016 Share Posted October 17, 2016 3 minutes ago, Juergen said: @jmartsch yes I use the latest dev 3.0.36 where Ryan has included Bitpoets code changes. Just clarifying - you actually need 3.0.37: https://github.com/processwire/processwire/commits/dev 1 Link to comment Share on other sites More sharing options...
Juergen Posted October 17, 2016 Author Share Posted October 17, 2016 Of course, just a typing mistake 1 Link to comment Share on other sites More sharing options...
Juergen Posted October 17, 2016 Author Share Posted October 17, 2016 Just to clearify: It only happens if I use $mail->bodyHTML If I use $mail->body everything is ok. Link to comment Share on other sites More sharing options...
dotnetic Posted October 18, 2016 Share Posted October 18, 2016 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. Link to comment Share on other sites More sharing options...
BitPoet Posted October 18, 2016 Share Posted October 18, 2016 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. 7 Link to comment Share on other sites More sharing options...
dotnetic Posted October 18, 2016 Share Posted October 18, 2016 Cool. You´re supercool! Link to comment Share on other sites More sharing options...
BitPoet Posted October 18, 2016 Share Posted October 18, 2016 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. 1 Link to comment Share on other sites More sharing options...
dotnetic Posted October 18, 2016 Share Posted October 18, 2016 It just worked E-Mail looks fine. Umlauts work correct and the attachment is correct. 2 Link to comment Share on other sites More sharing options...
BitPoet Posted October 19, 2016 Share Posted October 19, 2016 That's great to hear. Thanks for testing! 1 Link to comment Share on other sites More sharing options...
dotnetic Posted October 19, 2016 Share Posted October 19, 2016 2 hours ago, BitPoet said: That's great to hear. Thanks for testing! I do some more testing with different settings and report back. Link to comment Share on other sites More sharing options...
Autofahrn Posted April 26, 2018 Share Posted April 26, 2018 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 More sharing options...
horst Posted April 26, 2018 Share Posted April 26, 2018 @Autofahrn, have you tried out one of the WireMail-ThirdPartyModules? 1 1 Link to comment Share on other sites More sharing options...
Autofahrn Posted April 26, 2018 Share Posted April 26, 2018 Didn't considered alternatives yet, since WireMail basically works ok for me . Link to comment Share on other sites More sharing options...
BitPoet Posted May 3, 2018 Share Posted May 3, 2018 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. 2 Link to comment Share on other sites More sharing options...
bramwolf Posted June 14, 2019 Share Posted June 14, 2019 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now