Diffstat (limited to 'noncore/net/mail/composemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/composemail.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp index f680f5c..f532815 100644 --- a/noncore/net/mail/composemail.cpp +++ b/noncore/net/mail/composemail.cpp | |||
@@ -159,24 +159,25 @@ void ComposeMail::removeAttachment() | |||
159 | 159 | ||
160 | void ComposeMail::accept() | 160 | void ComposeMail::accept() |
161 | { | 161 | { |
162 | if ( checkBoxLater->isChecked() ) { | 162 | if ( checkBoxLater->isChecked() ) { |
163 | qDebug( "Send later" ); | 163 | qDebug( "Send later" ); |
164 | } | 164 | } |
165 | 165 | ||
166 | 166 | ||
167 | qDebug( "Sending Mail with " + | 167 | qDebug( "Sending Mail with " + |
168 | smtpAccounts.at( fromBox->currentItem() )->getAccountName() ); | 168 | smtpAccounts.at( fromBox->currentItem() )->getAccountName() ); |
169 | Mail *mail = new Mail(); | 169 | Mail *mail = new Mail(); |
170 | SMTPaccount *smtp = smtpAccounts.at( fromBox->currentItem() ); | 170 | SMTPaccount *smtp = smtpAccounts.at( fromBox->currentItem() ); |
171 | |||
171 | mail->setMail( smtp->getMail() ); | 172 | mail->setMail( smtp->getMail() ); |
172 | mail->setName( smtp->getName() ); | 173 | mail->setName( smtp->getName() ); |
173 | 174 | ||
174 | if ( !toLine->text().isEmpty() ) { | 175 | if ( !toLine->text().isEmpty() ) { |
175 | mail->setTo( toLine->text() ); | 176 | mail->setTo( toLine->text() ); |
176 | } else { | 177 | } else { |
177 | qDebug( "No Reciever spezified -> returning" ); | 178 | qDebug( "No Reciever spezified -> returning" ); |
178 | return; | 179 | return; |
179 | } | 180 | } |
180 | 181 | ||
181 | mail->setCC( ccLine->text() ); | 182 | mail->setCC( ccLine->text() ); |
182 | mail->setBCC( bccLine->text() ); | 183 | mail->setBCC( bccLine->text() ); |
@@ -186,25 +187,25 @@ void ComposeMail::accept() | |||
186 | if ( !sigMultiLine->text().isEmpty() ) { | 187 | if ( !sigMultiLine->text().isEmpty() ) { |
187 | txt.append( "\n--\n" ); | 188 | txt.append( "\n--\n" ); |
188 | txt.append( sigMultiLine->text() ); | 189 | txt.append( sigMultiLine->text() ); |
189 | } | 190 | } |
190 | mail->setMessage( txt ); | 191 | mail->setMessage( txt ); |
191 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); | 192 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); |
192 | while ( it != NULL ) { | 193 | while ( it != NULL ) { |
193 | mail->addAttachment( it->getAttachment() ); | 194 | mail->addAttachment( it->getAttachment() ); |
194 | it = (AttachViewItem *) it->itemBelow(); | 195 | it = (AttachViewItem *) it->itemBelow(); |
195 | } | 196 | } |
196 | 197 | ||
197 | SMTPwrapper wrapper( settings ); | 198 | SMTPwrapper wrapper( settings ); |
198 | wrapper.sendMail( *mail ); | 199 | wrapper.sendMail( *mail,checkBoxLater->isChecked() ); |
199 | 200 | ||
200 | QDialog::accept(); | 201 | QDialog::accept(); |
201 | } | 202 | } |
202 | 203 | ||
203 | AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) | 204 | AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) |
204 | : QListViewItem( parent ) | 205 | : QListViewItem( parent ) |
205 | { | 206 | { |
206 | attachment = att; | 207 | attachment = att; |
207 | qDebug( att->getMimeType() ); | 208 | qDebug( att->getMimeType() ); |
208 | setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? | 209 | setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? |
209 | Resource::loadPixmap( "UnknownDocument-14" ) : | 210 | Resource::loadPixmap( "UnknownDocument-14" ) : |
210 | attachment->getDocLnk().pixmap() ); | 211 | attachment->getDocLnk().pixmap() ); |