summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/smtpwrapper.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper/smtpwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index 04a21ea..6a1b505 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -104,3 +104,3 @@ void SMTPwrapper::storeMail(const char*mail, size_t length, const QString&box) {
-void SMTPwrapper::smtpSend( mailmime *mail,bool later) {
+bool SMTPwrapper::smtpSend( mailmime *mail,bool later) {
clist *rcpts = 0;
@@ -120,4 +120,4 @@ void SMTPwrapper::smtpSend( mailmime *mail,bool later) {
free(data);
- ; // odebug << "Error fetching mime..." << oendl;
- return;
+ qDebug("Error fetching mime... ");
+ return false;
}
@@ -132,3 +132,3 @@ void SMTPwrapper::smtpSend( mailmime *mail,bool later) {
emit queuedMails( m_queuedMail );
- return;
+ return true;
}
@@ -136,3 +136,3 @@ void SMTPwrapper::smtpSend( mailmime *mail,bool later) {
rcpts = createRcptList( mail->mm_data.mm_message.mm_fields );
- smtpSend(from,rcpts,data,size);
+ bool result = smtpSend(from,rcpts,data,size);
if (data) {
@@ -145,2 +145,3 @@ void SMTPwrapper::smtpSend( mailmime *mail,bool later) {
smtp_address_list_free( rcpts );
+ return result;
}
@@ -318,9 +319,10 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size )
-void SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later )
+bool SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later )
{
mailmime * mimeMail;
-
+ bool result = true;
mimeMail = createMimeMail(mail );
- if ( mimeMail == NULL ) {
- ; // odebug << "sendMail: error creating mime mail" << oendl;
+ if ( mimeMail == 0 ) {
+ qDebug("SMTP wrapper:Error creating mail! ");
+ return false;
} else {
@@ -329,3 +331,3 @@ void SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later
sendProgress->setMaxMails(1);
- smtpSend( mimeMail,later);
+ result = smtpSend( mimeMail,later);
; // odebug << "Clean up done" << oendl;
@@ -336,2 +338,3 @@ void SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later
}
+ return result;
}