summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/composemail.cpp43
1 files changed, 21 insertions, 22 deletions
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp
index b9c9cbc..445cc5e 100644
--- a/noncore/net/mail/composemail.cpp
+++ b/noncore/net/mail/composemail.cpp
@@ -189,11 +189,11 @@ void ComposeMail::accept()
189 smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() ); 189 smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() );
190#endif 190#endif
191 Mail mail; 191 Opie::osmart_pointer<Mail> mail=new Mail;
192 192
193 SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); 193 SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() );
194 mail.setMail(fromBox->currentText()); 194 mail->setMail(fromBox->currentText());
195 195
196 if ( !toLine->text().isEmpty() ) { 196 if ( !toLine->text().isEmpty() ) {
197 mail.setTo( toLine->text() ); 197 mail->setTo( toLine->text() );
198 } else { 198 } else {
199 QMessageBox::warning(0,tr("Sending mail"), 199 QMessageBox::warning(0,tr("Sending mail"),
@@ -201,13 +201,13 @@ void ComposeMail::accept()
201 return; 201 return;
202 } 202 }
203 mail.setName(senderNameEdit->text()); 203 mail->setName(senderNameEdit->text());
204 mail.setCC( ccLine->text() ); 204 mail->setCC( ccLine->text() );
205 mail.setBCC( bccLine->text() ); 205 mail->setBCC( bccLine->text() );
206 mail.setReply( replyLine->text() ); 206 mail->setReply( replyLine->text() );
207 mail.setSubject( subjectLine->text() ); 207 mail->setSubject( subjectLine->text() );
208 if (!m_replyid.isEmpty()) { 208 if (!m_replyid.isEmpty()) {
209 QStringList ids; 209 QStringList ids;
210 ids.append(m_replyid); 210 ids.append(m_replyid);
211 mail.setInreply(ids); 211 mail->setInreply(ids);
212 } 212 }
213 QString txt = message->text(); 213 QString txt = message->text();
@@ -216,9 +216,8 @@ void ComposeMail::accept()
216 txt.append( sigMultiLine->text() ); 216 txt.append( sigMultiLine->text() );
217 } 217 }
218 qDebug(txt); 218 mail->setMessage( txt );
219 mail.setMessage( txt );
220 AttachViewItem *it = (AttachViewItem *) attList->firstChild(); 219 AttachViewItem *it = (AttachViewItem *) attList->firstChild();
221 while ( it != NULL ) { 220 while ( it != NULL ) {
222 mail.addAttachment( it->getAttachment() ); 221 mail->addAttachment( it->getAttachment() );
223 it = (AttachViewItem *) it->nextSibling(); 222 it = (AttachViewItem *) it->nextSibling();
224 } 223 }
@@ -238,16 +237,16 @@ void ComposeMail::reject()
238 237
239 if (yesno == 0) { 238 if (yesno == 0) {
240 Mail mail; 239 Opie::osmart_pointer<Mail> mail=new Mail();
241 mail.setMail(fromBox->currentText()); 240 mail->setMail(fromBox->currentText());
242 mail.setTo( toLine->text() ); 241 mail->setTo( toLine->text() );
243 mail.setName(senderNameEdit->text()); 242 mail->setName(senderNameEdit->text());
244 mail.setCC( ccLine->text() ); 243 mail->setCC( ccLine->text() );
245 mail.setBCC( bccLine->text() ); 244 mail->setBCC( bccLine->text() );
246 mail.setReply( replyLine->text() ); 245 mail->setReply( replyLine->text() );
247 mail.setSubject( subjectLine->text() ); 246 mail->setSubject( subjectLine->text() );
248 if (!m_replyid.isEmpty()) { 247 if (!m_replyid.isEmpty()) {
249 QStringList ids; 248 QStringList ids;
250 ids.append(m_replyid); 249 ids.append(m_replyid);
251 mail.setInreply(ids); 250 mail->setInreply(ids);
252 } 251 }
253 QString txt = message->text(); 252 QString txt = message->text();
@@ -257,5 +256,5 @@ void ComposeMail::reject()
257 } 256 }
258 qDebug(txt); 257 qDebug(txt);
259 mail.setMessage( txt ); 258 mail->setMessage( txt );
260 259
261 /* only use the default drafts folder name! */ 260 /* only use the default drafts folder name! */