summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2
Unidiff
Diffstat (limited to 'noncore/unsupported/mail2') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/composer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/noncore/unsupported/mail2/composer.cpp b/noncore/unsupported/mail2/composer.cpp
index 03dacae..52ebbdd 100644
--- a/noncore/unsupported/mail2/composer.cpp
+++ b/noncore/unsupported/mail2/composer.cpp
@@ -161,13 +161,13 @@ void Composer::slotSendMail()
161 connect(handler, SIGNAL(error(const QString &)), SLOT(slotSendError(const QString &))); 161 connect(handler, SIGNAL(error(const QString &)), SLOT(slotSendError(const QString &)));
162 connect(handler, SIGNAL(status(const QString &)), status, SLOT(setText(const QString &))); 162 connect(handler, SIGNAL(status(const QString &)), status, SLOT(setText(const QString &)));
163} 163}
164 164
165void Composer::slotSendQueued() 165void Composer::slotSendQueued()
166{ 166{
167 167 int effSendCount = 0;
168 qDebug("Sending queued messages"); 168 qDebug("Sending queued messages");
169 Config cfg( "mailqueue", Config::User ); 169 Config cfg( "mailqueue", Config::User );
170 cfg.setGroup( "Settings" ); 170 cfg.setGroup( "Settings" );
171 _sendCount = 0; 171 _sendCount = 0;
172 _sendError = 0; 172 _sendError = 0;
173 _toSend = cfg.readNumEntry( "count", 0 ); 173 _toSend = cfg.readNumEntry( "count", 0 );
@@ -242,18 +242,23 @@ void Composer::slotSendQueued()
242 if (header.isNull() || message.isNull()) continue;//return;// Aborted. 242 if (header.isNull() || message.isNull()) continue;//return;// Aborted.
243 243
244 // abort->setEnabled(true); 244 // abort->setEnabled(true);
245 245
246 qDebug("Sending to %s",toAdr.latin1()); 246 qDebug("Sending to %s",toAdr.latin1());
247 SmtpHandler *handler = new SmtpHandler(header, message, accnt ,toAdr); 247 SmtpHandler *handler = new SmtpHandler(header, message, accnt ,toAdr);
248 248 effSendCount++;
249 connect(handler, SIGNAL(finished()), SLOT(slotSendQueuedFinished())); 249 connect(handler, SIGNAL(finished()), SLOT(slotSendQueuedFinished()));
250 connect(handler, SIGNAL(error(const QString &)), SLOT(slotSendQueuedError(const QString &))); 250 connect(handler, SIGNAL(error(const QString &)), SLOT(slotSendQueuedError(const QString &)));
251 connect(handler, SIGNAL(status(const QString &)), status, SLOT(setText(const QString &))); 251 connect(handler, SIGNAL(status(const QString &)), status, SLOT(setText(const QString &)));
252 252
253 } 253 }
254 if (effSendCount < _toSend)
255 {
256 _toSend = effSendCount;
257 QMessageBox::information(this, tr("Error"), tr("<p>There was a problem sending some of the queued mails.</p>"), tr("Ok"));
258 }
254} 259}
255 260
256void Composer::slotQueueMail() 261void Composer::slotQueueMail()
257{ 262{
258 if (to->text().find(QRegExp(".*\\@.*\\..*")) == -1) { 263 if (to->text().find(QRegExp(".*\\@.*\\..*")) == -1) {
259 QMessageBox::information(this, tr("Error"), tr("<p>You have to specify a recipient.<br>(eg: foo@bar.org)</p>"), tr("Ok")); 264 QMessageBox::information(this, tr("Error"), tr("<p>You have to specify a recipient.<br>(eg: foo@bar.org)</p>"), tr("Ok"));