Diffstat (limited to 'noncore/unsupported/mail2/composer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/composer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/unsupported/mail2/composer.cpp b/noncore/unsupported/mail2/composer.cpp index 2f13604..03d50b6 100644 --- a/noncore/unsupported/mail2/composer.cpp +++ b/noncore/unsupported/mail2/composer.cpp | |||
@@ -116,48 +116,50 @@ void Composer::slotSendMail() | |||
116 | attachments.append(((AttachViewItem *)item)->attachment()); | 116 | attachments.append(((AttachViewItem *)item)->attachment()); |
117 | } | 117 | } |
118 | 118 | ||
119 | smail.setAttachments(attachments); | 119 | smail.setAttachments(attachments); |
120 | 120 | ||
121 | QString header, message; | 121 | QString header, message; |
122 | MailFactory::genMail(header, message, smail, this); | 122 | MailFactory::genMail(header, message, smail, this); |
123 | 123 | ||
124 | abort->setEnabled(true); | 124 | abort->setEnabled(true); |
125 | 125 | ||
126 | SmtpHandler *handler = new SmtpHandler(header, message, accountsLoaded[from->currentItem()], to->text()); | 126 | SmtpHandler *handler = new SmtpHandler(header, message, accountsLoaded[from->currentItem()], to->text()); |
127 | connect(handler, SIGNAL(finished()), SLOT(slotSendFinished())); | 127 | connect(handler, SIGNAL(finished()), SLOT(slotSendFinished())); |
128 | connect(handler, SIGNAL(error(const QString &)), SLOT(slotSendError(const QString &))); | 128 | connect(handler, SIGNAL(error(const QString &)), SLOT(slotSendError(const QString &))); |
129 | connect(handler, SIGNAL(status(const QString &)), status, SLOT(setText(const QString &))); | 129 | connect(handler, SIGNAL(status(const QString &)), status, SLOT(setText(const QString &))); |
130 | } | 130 | } |
131 | 131 | ||
132 | void Composer::slotSendError(const QString &error) | 132 | void Composer::slotSendError(const QString &error) |
133 | { | 133 | { |
134 | status->setText(tr("<font color=#ff0000>Error occoured during sending.</font>")); | 134 | status->setText(tr("<font color=#ff0000>Error occoured during sending.</font>")); |
135 | QMessageBox::warning(this, tr("Error"), tr("<p>%1</p").arg(error), tr("Ok")); | 135 | QMessageBox::warning(this, tr("Error"), tr("<p>%1</p").arg(error), tr("Ok")); |
136 | } | 136 | } |
137 | 137 | ||
138 | void Composer::slotSendFinished() | 138 | void Composer::slotSendFinished() |
139 | { | 139 | { |
140 | QMessageBox::information(this, tr("Success"), tr("<p>The mail was sent successfully.</p>"), tr("Ok")); | ||
141 | |||
140 | status->setText(QString(0)); | 142 | status->setText(QString(0)); |
141 | abort->setEnabled(false); | 143 | abort->setEnabled(false); |
142 | } | 144 | } |
143 | 145 | ||
144 | void Composer::slotFillStuff() | 146 | void Composer::slotFillStuff() |
145 | { | 147 | { |
146 | QValueList<Account> accounts = ConfigFile::getAccounts(); | 148 | QValueList<Account> accounts = ConfigFile::getAccounts(); |
147 | int i = 0; | 149 | int i = 0; |
148 | 150 | ||
149 | QValueList<Account>::Iterator it; | 151 | QValueList<Account>::Iterator it; |
150 | for (it = accounts.begin(); it != accounts.end(); it++) { | 152 | for (it = accounts.begin(); it != accounts.end(); it++) { |
151 | if (!(*it).email().isEmpty() && !(*it).smtpServer().isEmpty() && !(*it).smtpPort().isEmpty()) { | 153 | if (!(*it).email().isEmpty() && !(*it).smtpServer().isEmpty() && !(*it).smtpPort().isEmpty()) { |
152 | if (!(*it).realName().isEmpty()) | 154 | if (!(*it).realName().isEmpty()) |
153 | from->insertItem((*it).realName() + " <" + (*it).email() + ">", i); | 155 | from->insertItem((*it).realName() + " <" + (*it).email() + ">", i); |
154 | else | 156 | else |
155 | from->insertItem((*it).email()); | 157 | from->insertItem((*it).email()); |
156 | 158 | ||
157 | accountsLoaded.append(*it); | 159 | accountsLoaded.append(*it); |
158 | i++; | 160 | i++; |
159 | } | 161 | } |
160 | } | 162 | } |
161 | } | 163 | } |
162 | 164 | ||
163 | void Composer::slotFromChanged(int id) | 165 | void Composer::slotFromChanged(int id) |