Diffstat (limited to 'noncore/unsupported/mail2/viewmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/viewmail.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/unsupported/mail2/viewmail.cpp b/noncore/unsupported/mail2/viewmail.cpp index 3c88d99..da6924d 100644 --- a/noncore/unsupported/mail2/viewmail.cpp +++ b/noncore/unsupported/mail2/viewmail.cpp | |||
@@ -138,61 +138,61 @@ void ViewMail::slotForward() | |||
138 | if (!_gotBody) { | 138 | if (!_gotBody) { |
139 | QMessageBox::information(this, tr("Error"), tr("<p>The mail body is not yet downloaded, so you cannot forward yet."), tr("Ok")); | 139 | QMessageBox::information(this, tr("Error"), tr("<p>The mail body is not yet downloaded, so you cannot forward yet."), tr("Ok")); |
140 | return; | 140 | return; |
141 | } | 141 | } |
142 | 142 | ||
143 | QString ftext; | 143 | QString ftext; |
144 | ftext += QString("\n----- Forwarded message from %1 -----\n\n") | 144 | ftext += QString("\n----- Forwarded message from %1 -----\n\n") |
145 | .arg(_mail.envelope().from()[0].toString()); | 145 | .arg(_mail.envelope().from()[0].toString()); |
146 | if (!_mail.envelope().mailDate().isNull()) | 146 | if (!_mail.envelope().mailDate().isNull()) |
147 | ftext += QString("Date: %1\n") | 147 | ftext += QString("Date: %1\n") |
148 | .arg(_mail.envelope().mailDate()); | 148 | .arg(_mail.envelope().mailDate()); |
149 | if (!_mail.envelope().from()[0].toString().isNull()) | 149 | if (!_mail.envelope().from()[0].toString().isNull()) |
150 | ftext += QString("From: %1\n") | 150 | ftext += QString("From: %1\n") |
151 | .arg(_mail.envelope().from()[0].toString()); | 151 | .arg(_mail.envelope().from()[0].toString()); |
152 | if (!_mail.envelope().to().toString().isNull()) | 152 | if (!_mail.envelope().to().toString().isNull()) |
153 | ftext += QString("To: %1\n") | 153 | ftext += QString("To: %1\n") |
154 | .arg(_mail.envelope().to().toString()); | 154 | .arg(_mail.envelope().to().toString()); |
155 | if (!_mail.envelope().cc().toString().isNull()) | 155 | if (!_mail.envelope().cc().toString().isNull()) |
156 | ftext += QString("Cc: %1\n") | 156 | ftext += QString("Cc: %1\n") |
157 | .arg(_mail.envelope().cc().toString()); | 157 | .arg(_mail.envelope().cc().toString()); |
158 | if (!_mail.envelope().bcc().toString().isNull()) | 158 | if (!_mail.envelope().bcc().toString().isNull()) |
159 | ftext += QString("Bcc: %1\n") | 159 | ftext += QString("Bcc: %1\n") |
160 | .arg(_mail.envelope().bcc().toString()); | 160 | .arg(_mail.envelope().bcc().toString()); |
161 | if (!_mail.envelope().subject().isNull()) | 161 | if (!_mail.envelope().subject().isNull()) |
162 | ftext += QString("Subject: %1\n") | 162 | ftext += QString("Subject: %1\n") |
163 | .arg(_mail.envelope().subject()); | 163 | .arg(_mail.envelope().subject()); |
164 | 164 | ||
165 | ftext += QString("\n%1\n") | 165 | ftext += QString("\n%1\n") |
166 | .arg(_mail.bodyPart(1).data()); | 166 | .arg(_mail.bodyPart(1).data()); |
167 | 167 | ||
168 | ftext += QString("----- End forwarded message -----\n"); | 168 | ftext += QString("----- End forwarded message -----\n"); |
169 | 169 | ||
170 | SendMail sendMail; | 170 | SendMail sendMail; |
171 | sendMail.setSubject("Fwd: " + _mail.envelope().subject()); | 171 | sendMail.setSubject("Fwd: " + _mail.envelope().subject()); |
172 | sendMail.setMessage(ftext); | 172 | sendMail.setMessage(ftext); |
173 | 173 | ||
174 | Composer composer(this, 0, true); | 174 | Composer composer(this, 0, true); |
175 | composer.setSendMail(sendMail); | 175 | composer.setSendMail(sendMail); |
176 | composer.showMaximized(); | 176 | composer.showMaximized(); |
177 | composer.exec(); | 177 | composer.exec(); |
178 | } | 178 | } |
179 | 179 | ||
180 | void ViewMail::slotIMAPUid(IMAPResponse &response) | 180 | void ViewMail::slotIMAPUid(IMAPResponse &response) |
181 | { | 181 | { |
182 | disconnect(_handler, SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPUid(IMAPResponse &))); | 182 | disconnect(_handler, SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPUid(IMAPResponse &))); |
183 | 183 | ||
184 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { | 184 | if (response.statusResponse().status() == IMAPResponseEnums::OK) { |
185 | QValueList<IMAPResponseBodyPart> bodyParts; | 185 | QValueList<IMAPResponseBodyPart> bodyParts; |
186 | bodyParts.append(response.FETCH()[0].bodyPart(1)); | 186 | bodyParts.append(response.FETCH()[0].bodyPart(0)); |
187 | _mail.setBodyParts(bodyParts); | 187 | _mail.setBodyParts(bodyParts); |
188 | 188 | ||
189 | browser->setText(QString(_mailHtml).arg(deHtml(response.FETCH()[0].bodyPart(1).data()))); | 189 | browser->setText(QString(_mailHtml).arg(deHtml(response.FETCH()[0].bodyPart(0).data()))); |
190 | 190 | ||
191 | // fillList(response.FETCH()[0].bodyStructure()); | 191 | // fillList(response.FETCH()[0].bodyStructure()); |
192 | 192 | ||
193 | _gotBody = true; | 193 | _gotBody = true; |
194 | } else { | 194 | } else { |
195 | QMessageBox::warning(this, tr("Error"), tr("<p>I was unable to retrieve the mail from the server. You can try again later or give up.</p>"), tr("Ok")); | 195 | QMessageBox::warning(this, tr("Error"), tr("<p>I was unable to retrieve the mail from the server. You can try again later or give up.</p>"), tr("Ok")); |
196 | } | 196 | } |
197 | } | 197 | } |
198 | 198 | ||