Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Enhancement: bundle access to recipient and other headers?

#1852

I've been using the org-mode bundle to grab the contents of mail to a file
https://github.com/alls0rts/org-mode.mmbundle

I would like to be able to also get the sender's name and received date.

Currently I am able to accomplish this using a combination of "open in Apple Mail" and then using a Service to inform emacs to grab the mail using a modified org-mac-grab-link to capture the email contents, subject, link, sender and date via apple script.

Getting access to sender & date directly in the bundle would be great.

Thanks,
Stacey

Reported by Stacey Marshall · October 20th, 2017 @ 11:22 AM

State: new
Milestone: none
Assigned to: benny benny

Activity

  1. benny
    benny

    You can get any header value into an environment variable by using the environment key in the .mmCommand file. Here's an example:

    environment   = 'MM_DATE=${#date-received}\nMM_FROM=${from}\nMM_SUBJECT=${subject}\nMM_MESSAGE_ID=${message-id.split}\n';
    

    You might prefer from.address or subject.body or some other specifier variant.

    Does that help?

    October 21st, 2017 @ 02:47 PM

  2. Stacey Marshall
    Stacey Marshall
    • Tag changed from bundle to environment documentation, bundle

    Wow! Thanks Benny that looks to be exactly what I am looking for.

    And armed with that I found once again MailMate bundles for fun and profit which documents bundles and how to edit said files and even discusses the environment setting.

    Thanks,
    Stacey

    October 23rd, 2017 @ 09:18 AM

  3. benny
    benny
    • State changed from new to resolved

    I'm lucky that someone else at least documented part of what bundles can do :) (It's still a high priority for me to get some documentation written on this.)

    November 13th, 2017 @ 08:32 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.