WARNING: multiple messages have this Message-ID
From: Arun Isaac <arunisaac@systemreboot.net> To: Ricardo Wurmus <rekado@elephly.net>, guile-email@systemreboot.net Subject: Re: [guile-email] parse-email-headers returns just “fields” Date: Thu, 23 Apr 2020 06:56:28 +0530 Message-ID: <cu7lfmnvvp7.fsf@systemreboot.net> (raw) In-Reply-To: <87k129kowf.fsf@elephly.net> [-- Attachment #1: Type: text/plain, Size: 908 bytes --] > In some cases the emails don’t seem to have a > content-transfer-encoding header, This is not a problem. RFC2045 specifies that "Content-Transfer-Encoding: 7BIT" should be assumed if the Content-Transfer-Encoding header is not present. guile-email implements this recommendation. > * I sometimes need to discard the first two lines of the raw email to > get the headers to be fully parsed Your attachment is an mbox, not a raw email. Perhaps you are treating it as a raw email and that's why you have to chop off the first line? And, I'm guessing your other problems are also related to this. The following snippet works for me. Could you confirm? --8<---------------cut here---------------start------------->8--- (parse-email (first (call-with-input-file "/path/to/your/attachment" mbox->emails))) --8<---------------cut here---------------end--------------->8--- [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --]
From: Arun Isaac <arunisaac@systemreboot.net> To: Ricardo Wurmus <rekado@elephly.net>, guile-email@systemreboot.net Subject: Re: [guile-email] parse-email-headers returns just “fields” Date: Thu, 23 Apr 2020 06:56:28 +0530 Message-ID: <cu7lfmnvvp7.fsf@systemreboot.net> (raw) Message-ID: <20200423012628.QODeqAYNb7FgdFv9s8JS6Y0SU2F7tkGJx0iXw34K_WM@z> (raw) In-Reply-To: <87k129kowf.fsf@elephly.net> [-- Attachment #1.1: Type: text/plain, Size: 908 bytes --] > In some cases the emails don’t seem to have a > content-transfer-encoding header, This is not a problem. RFC2045 specifies that "Content-Transfer-Encoding: 7BIT" should be assumed if the Content-Transfer-Encoding header is not present. guile-email implements this recommendation. > * I sometimes need to discard the first two lines of the raw email to > get the headers to be fully parsed Your attachment is an mbox, not a raw email. Perhaps you are treating it as a raw email and that's why you have to chop off the first line? And, I'm guessing your other problems are also related to this. The following snippet works for me. Could you confirm? --8<---------------cut here---------------start------------->8--- (parse-email (first (call-with-input-file "/path/to/your/attachment" mbox->emails))) --8<---------------cut here---------------end--------------->8--- [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] [-- Attachment #2: Type: text/plain, Size: 110 bytes --] -- guile-email mailing list guile-email@systemreboot.net https://lists.systemreboot.net/listinfo/guile-email
next prev parent reply index Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-21 12:24 Ricardo Wurmus 2020-04-23 1:26 ` Arun Isaac [this message] 2020-04-23 1:26 ` Arun Isaac 2020-04-23 6:35 ` Ricardo Wurmus 2020-04-23 11:31 ` Arun Isaac 2020-04-23 11:31 ` Arun Isaac 2020-04-23 14:40 ` Ricardo Wurmus 2020-04-23 21:54 ` Arun Isaac 2020-04-23 21:54 ` Arun Isaac
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=cu7lfmnvvp7.fsf@systemreboot.net \ --to=arunisaac@systemreboot.net \ --cc=guile-email@systemreboot.net \ --cc=rekado@elephly.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
guile-email discussion Archives are clonable: git clone --mirror http://lists.systemreboot.net/guile-email/0 guile-email/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 guile-email guile-email/ http://lists.systemreboot.net/guile-email \ guile-email@systemreboot.net public-inbox-index guile-email Example config snippet for mirrors AGPL code for this site: git clone https://public-inbox.org/public-inbox.git