GithubHelp home page GithubHelp logo

Comments (6)

ggrossetie avatar ggrossetie commented on May 18, 2024

Hello @devpad, can I ask you where the output came from ? I guess it's from the mock implementation but I want to be sure.

Thanks,
Guillaume.

from play-mailer.

devpad avatar devpad commented on May 18, 2024

Hello @Mogztter, yes, the original letter in Gmail, shows the same output.

from play-mailer.

ggrossetie avatar ggrossetie commented on May 18, 2024

Ok I will do some testing on this issue, thanks.

from play-mailer.

ggrossetie avatar ggrossetie commented on May 18, 2024

@devpad is your source code encoded in UTF-8 ?

from play-mailer.

devpad avatar devpad commented on May 18, 2024

@Mogztter, yes, source codes in UTF-8. The setFrom() method doesn't code a user name in UTF-8 whereas in the addTo() method everything works correctly.

Example:

Email email = new Email();
email.setSubject("Example");
email.setFrom("Кириллица <[email protected]>");
email.addTo("Кириллица <[email protected]>");
...
MailerPlugin.send(email);

Output in gmail:

...
Date: Sun, 15 Feb 2015 16:38:48 +0300 (MSK)
From: "�8@8;;8F0" <[email protected]>
To: =?UTF-8?B?0JrQuNGA0LjQu9C70LjRhtCw?= <[email protected]>
Message-ID: <.....>
Subject: Example
MIME-Version: 1.0
...

from play-mailer.

ggrossetie avatar ggrossetie commented on May 18, 2024

Strange... the play-mailer extension is based on Apache commons email and the code is similar between setFrom and addTo:

You are using the plugin in Java but we simply convert the Java object Email to the Scala object Email : https://github.com/playframework/play-mailer/blob/master/src/main/scala/play/api/libs/mailer/MailerPlugin.scala#L114

Can you try to force the charset with setCharset (I don't see why this should fix this issue but who knows 😄
https://github.com/playframework/play-mailer/blob/master/src/main/scala/play/libs/mailer/Email.java#L136

from play-mailer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.