From 2d745b6662228024037be88661286d773bd377fa Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 6 Sep 2011 19:16:51 +0300 Subject: [PATCH] Demo 3 modified. The demo files was removed from QT Creator project file (SMTPEmail.pro) --- SMTPEmail.pro | 11 +++-------- demos/demo3.cpp | 24 +++++++++++++++++------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/SMTPEmail.pro b/SMTPEmail.pro index 741a51f..ed9b09b 100644 --- a/SMTPEmail.pro +++ b/SMTPEmail.pro @@ -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 += diff --git a/demos/demo3.cpp b/demos/demo3.cpp index a33922e..8571ef3 100644 --- a/demos/demo3.cpp +++ b/demos/demo3.cpp @@ -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 #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