Commit 8551623d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add default email

parent 519e6c3a
......@@ -19,6 +19,7 @@ set(headerthemeeditor_SRCS
newthemedialog.cpp
themesession.cpp
themeconfiguredialog.cpp
themeeditorutil.cpp
)
......
......@@ -16,6 +16,7 @@
*/
#include "previewpage.h"
#include "themeeditorutil.h"
#include "messageviewer/viewer.h"
#include <KMime/Message>
#include <KPushButton>
......@@ -42,17 +43,7 @@ PreviewPage::~PreviewPage()
void PreviewPage::slotUpdateViewer()
{
KMime::Message *msg = new KMime::Message;
QByteArray mail = "From: montel@example.com\n"
"To: kde@example.com\n"
"Sender: montel@example.com\n"
"MIME-Version: 1.0\n"
"Date: 28 Apr 2013 23:58:21 -0000\n"
"Subject: Test message\n"
"Content-Type: text/plain\n"
"X-Length: 0\n"
"X-UID: 6161\n"
"\n"
"Hello this is a test mail\n";
QByteArray mail = themeeditorutil::defaultMail().toLatin1();
msg->setContent( mail );
msg->parse();
mViewer->setMessage(KMime::Message::Ptr(msg));
......
/*
Copyright (c) 2013 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "themeeditorutil.h"
QString themeeditorutil::defaultMail()
{
QString mail = QString::fromLatin1("From: montel@example.com\n"
"To: kde@example.com\n"
"Sender: montel@example.com\n"
"MIME-Version: 1.0\n"
"Date: 28 Apr 2013 23:58:21 -0000\n"
"Subject: Test message\n"
"Content-Type: text/plain\n"
"X-Length: 0\n"
"X-UID: 6161\n"
"\n"
"Hello this is a test mail\n");
return mail;
}
/*
Copyright (c) 2013 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef THEMEEDITORUTIL_H
#define THEMEEDITORUTIL_H
#include <QString>
namespace themeeditorutil
{
QString defaultMail();
}
#endif // THEMEEDITORUTIL_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment