Demo 3 modified.

The demo files was removed from QT Creator project file (SMTPEmail.pro)
This commit is contained in:
Your Name 2011-09-06 19:16:51 +03:00
parent a118309811
commit 2d745b6662
2 changed files with 20 additions and 15 deletions

View File

@ -19,9 +19,7 @@ SOURCES += \
src/mimemessage.cpp \
src/mimepart.cpp \
src/mimetext.cpp \
src/smtpclient.cpp \
demos/demo2/sendemail.cpp \
demos/demo2/demo2.cpp
src/smtpclient.cpp
HEADERS += \
src/emailaddress.h \
@ -33,13 +31,10 @@ HEADERS += \
src/mimepart.h \
src/mimetext.h \
src/smtpclient.h \
src/SmtpMime \
demos/demo2/sendemail.h
src/SmtpMime
OTHER_FILES += \
demos/demo2/printscreen.png \
LICENSE \
README.md
FORMS += \
demos/demo2/sendemail.ui
FORMS +=

View File

@ -1,3 +1,19 @@
/*
Copyright (c) 2011 - Tőkés Attila
This file is part of SmtpClient for Qt.
SmtpClient for Qt is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
SmtpClient for Qt is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY.
See the LICENSE file for more details.
*/
#include <QtGui/QApplication>
#include "../src/SmtpMime"
@ -23,22 +39,16 @@ int main(int argc, char *argv[])
// Add some text
MimeText text;
text.setText("Hi,\nThis is a simple email message with some attachments.\n");
text.setText("Hi!\n This is an email with some attachments.");
message.addPart(&text);
// Now we create the attachment object
MimeAttachment attachment (new QFile("image1.jpg"));
// the file type can be setted. (by default is application/octet-stream)
attachment.setType("image/jpg");
// Now add it to message
message.addPart(&attachment);
// Add an another attachment