Package: sylpheed
Version: 3.7.0-6ubuntu1
Severity: important
Tags: patch

When sending an email with an email format file as an attachment, the
attachment is empty after successful sending.

Repeat steps:

1. Click the "Compose" button to write an email.

2. After you have filled in the right recipient, subject line and body of the
email, click the "Attach File "button and the Attach file window will pop up.

3. In the Attachment file selection window, select a file in email format.

4. Click the send button. After successful sending, check the sent and received
messages in the mail client.

I have fixed this bug. The attachment is the patch.
https://salsa.debian.org/sylpheed-team/sylpheed/-/merge_requests/6



-- System Information:
Debian Release: bullseye/sid
  APT prefers focal-updates
  APT policy: (500, 'focal-updates'), (500, 'focal-security'), (500, 'focal'), 
(100, 'focal-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.8.0-44-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages sylpheed depends on:
ii  libc6                2.31-0ubuntu9.2
ii  libcairo2            1.16.0-4ubuntu1
ii  libcompfaceg1        1:1.5.2-5build1
ii  libenchant-2-2       2.2.8-1ubuntu0.20.04.1
ii  libgdk-pixbuf2.0-0   2.40.0+dfsg-3ubuntu0.2
it  libglib2.0-0         2.64.6-1~ubuntu20.04.2
ii  libgpgme11           1.13.1-7ubuntu2
ii  libgtk2.0-0          2.24.32-4ubuntu4
ii  libgtkspell0         2.0.16-1.3
ii  libldap-2.4-2        2.4.49+dfsg-2ubuntu1.7
ii  libonig5             6.9.4-1
ii  libpango-1.0-0       1.44.7-2ubuntu4
ii  libpangocairo-1.0-0  1.44.7-2ubuntu4
ii  libssl1.1            1.1.1f-1ubuntu2.2
ii  pinentry-gtk2        1.1.0-3build1
ii  sensible-utils       0.0.12+nmu1

Versions of packages sylpheed recommends:
ii  aspell-en [aspell-dictionary]  2018.04.16-0-1
ii  ca-certificates                20210119~20.04.1
ii  sylfilter                      0.8-7
ii  sylpheed-i18n                  3.7.0-6ubuntu1

Versions of packages sylpheed suggests:
pn  claws-mail-tools  <none>
pn  curl              <none>
pn  sylpheed-doc      <none>
pn  sylpheed-plugins  <none>

-- no debconf information
From: Shui Qucheng <shuiquch...@uniontech.com>
Date: Thu, 11 Mar 2021 11:23:30 +0800
Subject: Fixed the problem that when sending e-mail with e-mail format file as 
attachment, the attachment was empty after successful sending.
     https://sylpheed.sraoss.jp/redmine/issues/327

---
 src/compose.c | 10 ++++++-
 1 file changed, 8 insertions(+), 2 deletion(-)

Index: src/compose.c
===================================================================
--- a/src/compose.c
+++ b/src/compose.c
@@ -4571,7 +4571,7 @@
 {
        GtkTreeModel *model = GTK_TREE_MODEL(compose->attach_store);
        GtkTreeIter iter;
-       gboolean valid;
+       gboolean valid,bmail;
        AttachInfo *ainfo;
        FILE *attach_fp;
        gint len;
@@ -4604,7 +4604,13 @@
 
                encoding = ainfo->encoding;
 
-               if (!g_ascii_strncasecmp(ainfo->content_type, "message/", 8)) {
+        if (!g_ascii_strncasecmp(ainfo->content_type, "message/rfc822", 14)) {
+                       bmail=TRUE;
+            ainfo->encoding = ENC_BASE64;
+               }else{
+                       bmail=FALSE;
+               } 
+               if (!bmail&&!g_ascii_strncasecmp(ainfo->content_type, 
"message/", 8)) {
                        fprintf(fp, "Content-Type: %s\n", ainfo->content_type);
                        fprintf(fp, "Content-Disposition: inline\n");
 

Reply via email to