diff --git a/muk_web_preview_mail/tests/__init__.py b/muk_web_preview_mail/tests/__init__.py
new file mode 100644
index 0000000..30c4fb0
--- /dev/null
+++ b/muk_web_preview_mail/tests/__init__.py
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+
+###################################################################################
+#
+# Copyright (C) 2017 MuK IT GmbH
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+###################################################################################
+
+from . import test_mail_parse
+
diff --git a/muk_web_preview_mail/tests/test_mail_parse.py b/muk_web_preview_mail/tests/test_mail_parse.py
new file mode 100644
index 0000000..a9fc95a
--- /dev/null
+++ b/muk_web_preview_mail/tests/test_mail_parse.py
@@ -0,0 +1,220 @@
+# -*- coding: utf-8 -*-
+
+###################################################################################
+#
+# Copyright (C) 2017 MuK IT GmbH
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+###################################################################################
+
+import base64
+import unittest
+
+from odoo import _
+from odoo.tests import common
+
+from .. import controllers
+
+class MailParseTestCase(common.TransactionCase):
+
+ at_install = False
+ post_install = True
+
+ def setUp(self):
+ super(MailParseTestCase, self).setUp()
+ self.attachment_model = self.env['ir.attachment'].sudo()
+ self.sample_mail_attachment = self.attachment_model.create({
+ 'name': 'SampleMail',
+ 'datas': base64.encodestring("""
+ Return-Path:
+ To: Manuel Lemos
+ Subject: Testing Manuel Lemos' MIME E-mail composing and sending PHP class: HTML message
+ From: mlemos
+ Reply-To: mlemos
+ Sender: mlemos@acm.org
+ X-Mailer: http://www.phpclasses.org/mimemessage $Revision: 1.63 $ (mail)
+ MIME-Version: 1.0
+ Content-Type: multipart/mixed; boundary="652b8c4dcb00cdcdda1e16af36781caf"
+ Message-ID: <20050430192829.0489.mlemos@acm.org>
+ Date: Sat, 30 Apr 2005 19:28:29 -0300
+
+
+ --652b8c4dcb00cdcdda1e16af36781caf
+ Content-Type: multipart/related; boundary="6a82fb459dcaacd40ab3404529e808dc"
+
+
+ --6a82fb459dcaacd40ab3404529e808dc
+ Content-Type: multipart/alternative; boundary="69c1683a3ee16ef7cf16edd700694a2f"
+
+
+ --69c1683a3ee16ef7cf16edd700694a2f
+ Content-Type: text/plain; charset=ISO-8859-1
+ Content-Transfer-Encoding: quoted-printable
+
+ This is an HTML message. Please use an HTML capable mail program to read
+ this message.
+
+ --69c1683a3ee16ef7cf16edd700694a2f
+ Content-Type: text/html; charset=ISO-8859-1
+ Content-Transfer-Encoding: quoted-printable
+
+
+
+ Testing Manuel Lemos' MIME E-mail composing and sending PHP class: H=
+ TML message
+
+
+
+
+
+
+
Testing Manuel Lemos' MIME E-mail composing and sending PHP cla=
+ ss: HTML message