schleichardt/Play-2-Mailplugin — pull request #2 by npcode (2013-07-12 08:04:43+00:00)
Title: Fix mimetypes are always text/plain in mock mode.

Currently when I send an email as follows:

HtmlEmail email = new HtmlEmail();
email.setSubject("hi");
email.setTextMsg("hello");
email.setHtmlMsg("

hello

");
Mailer.send(email);

If smtp.mock is true, the debug message says the second entity body's content type is text/plain even if it is text/html.

[debug] application - mock email send:
From: foo@gmail.com
To: bar@gmail.com
Date: Fri Jul 12 16:42:43 KST 2013
Subj: hi
cont:
text/plain: hello
text/plain:

hello

In order to fix this, saveChanges() is need to be called after calling buildMimeMessage() in getEmailDebugOutput(), to set contet types correctly.