diff --git a/Ree b/Ree deleted file mode 100644 index e69de29..0000000 diff --git a/SMTPEmail.pro b/SMTPEmail.pro index a57c238..de6f321 100644 --- a/SMTPEmail.pro +++ b/SMTPEmail.pro @@ -33,3 +33,5 @@ HEADERS += \ src/mimetext.h \ src/smtpclient.h \ src/SmtpMime + +OTHER_FILES += diff --git a/mail.cpp b/mail.cpp deleted file mode 100644 index 34616cc..0000000 --- a/mail.cpp +++ /dev/null @@ -1,101 +0,0 @@ -#include "mail.h" -#include - -Mail::Mail() -{ -} - -void Mail::setSender(QString address, QString name) -{ - this->sender = new EmailAddress(address, name); -} - -void Mail::addRecipient(QString rcpt, QString name) -{ - this->recipients << EmailAddress (rcpt, name); -} - -void Mail::setSubject(QString subject) -{ - this->subject = subject; -} - -void Mail::setContent(QString text) -{ - this->text = text; -} - -EmailAddress & Mail::getSender() -{ - return *sender; -} - -QList & Mail::getRecipients() -{ - return recipients; -} - -QString & Mail::getSubject() -{ - return subject; -} - -QString & Mail::getText() -{ - return text; - -} - -void Mail::addAttachment(QFile *file, QString type) -{ - attachments << Attachment (*file, type); -} - -QList & Mail::getAttachments() -{ - return attachments; -} - - - -/****** Email Address *******/ -EmailAddress::EmailAddress(QString address, QString name) -{ - this->address = address; - this->name = name; -} - -QString EmailAddress::getAddress() const -{ - return address; -} - -QString EmailAddress::getName() const -{ - return name; -} - - -/****** Attachment *******/ -Attachment::Attachment(QFile& file, QString type) : - file(file) -{ - //this->file = file; - this->type = type; - this->name = QFileInfo(file).fileName(); -} - -QFile& Attachment::getFile() const -{ - return file; -} - -QString Attachment::getName() const -{ - return name; -} - -QString Attachment::getType() const -{ - return type; -} diff --git a/mail.h b/mail.h deleted file mode 100644 index 74585bb..0000000 --- a/mail.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef MAIL_H -#define MAIL_H - -#include -#include - -class EmailAddress; -class Attachment; - -class Mail : public QObject -{ - Q_OBJECT -public: - Mail(); - - enum ContentType - { - Html, - PlainText - }; - - - void setSender(QString sender, QString name=""); - void setSender(EmailAddress adr); - - void addRecipient(QString rcpt, QString name=""); - void setSubject(QString title); - void setContent(QString text); - void setEncoding(QString text); - void addAttachment(QFile* file, QString type="application/octet-stream"); - - EmailAddress& getSender(); - QList& getRecipients(); - QString& getSubject(); - QString& getText(); - QList& getAttachments(); - - -private: - EmailAddress* sender; - QList recipients; - QString subject; - QString text; - QList attachments; - -}; -/* -class EmailAddress -{ -public: - EmailAddress(QString address, QString name=""); - - QString getName() const; - QString getAddress() const; - -private: - QString name; - QString address; -}; -*/ - -class Attachment -{ -public: - Attachment(QFile& file, QString type = "application/octet-stream"); - - QString getName() const; - QFile& getFile() const; - QString getType() const; - - void setName(QString name); - void setType(QString type); - -private: - QFile& file; - QString name; - QString type; -}; - - -#endif // MAIL_H