Diff
Logged in as anonymous

Differences From Artifact [d81e2bb00e]:

To Artifact [420cd8d808]:


184
185
186
187
188
189
190

191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
				}
			};
			*/
			if body.is_empty() && text_parts > 0 {
				let text = mail.body_text(0)
					.context("Failed to extract text from message")?
					.replace("\r\n", "\n");

				// 6:
				// - (headers)
				// - (mail text)
				// - 6: </pre>
				if text.len() < 4096 - ( reply.len() + 6 ) {
					body = text;
					text_num = 1;
				}
			};
			let msg = format!("{}{}</pre>", reply, validate(&body).stack()?);

			// and let's collect all other attachment parts
			let mut files_to_send = vec![];
			/*
			 * let's just skip html parts for now, they just duplicate text?
			while html_num < html_parts {
				files_to_send.push(mail.html_part(html_num).stack()?);







>





|



|







184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
				}
			};
			*/
			if body.is_empty() && text_parts > 0 {
				let text = mail.body_text(0)
					.context("Failed to extract text from message")?
					.replace("\r\n", "\n");
				let text = validate(&text).stack()?;
				// 6:
				// - (headers)
				// - (mail text)
				// - 6: </pre>
				if text.len() < 4096 - ( reply.len() + 6 ) {
					body = text.to_string();
					text_num = 1;
				}
			};
			let msg = format!("{}{}</pre>", reply, body);

			// and let's collect all other attachment parts
			let mut files_to_send = vec![];
			/*
			 * let's just skip html parts for now, they just duplicate text?
			while html_num < html_parts {
				files_to_send.push(mail.html_part(html_num).stack()?);