Dmitry Alexandrov <321942@gmail.com> čálii: > Kevin Brubeck Unhammer writes: > >> I just tried using browse-url-mail as a mailto-handler with the below >> script as my mail handler (set in XFCE settings): >> >> #!/bin/bash >> mailto="${*//\"/}" > > ... > >> if [[ ! ${mailto} =~ ^mailto: ]]; then >> mailto="mailto:${mailto}" >> fi > > Does not xdg-email(1) already do that? No. Try 'echo "$@">/tmp/log' at the top of your mail script. >> It seems to work with xdg-email, but when I use --attach to attach a >> file, it just appears as an "Attach: /path/to/file" header instead of >> the usual <#part thing. After sending, nothing is attached to the >> received message that I can tell. Is there a way to make browse-url-mail >> do the right thing, or to make message-mode treat that "Attach:" line >> correctly? > > Try this: > [...] > (Note, that I have virtually no experience with elisp, so use at your > own risk. :-) That worked! And even handles multiple attachments correctly, even though xdg-email uses multiple "attach" headers (which https://tools.ietf.org/html/rfc6068#page-6 warns against). Maybe open a bug report on this? It looks like an improvement to me. I don't know how attachments are handled by other mailto-users though – multiple identical hfname's or some separator in the hfvalue like with the "to" header? -- Kevin Brubeck Unhammer GPG: 0x766AC60C