<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">/max<br>
<a href="http://about.me/maxandersen" style="color:#3983C4">http://about.me/maxandersen</a></p>
<p dir="auto">On 17 Oct 2017, at 23:18, Giovanni Lanzani wrote:</p>
</div>
<div style="white-space:normal"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto">On 17 Oct 2017, at 22:34, Benny Kjær Nielsen wrote:<br>
</p>
<blockquote style="border-left:2px solid #777; color:#999; margin:0 0 5px; padding-left:5px; border-left-color:#999"><p dir="auto">On 14 Oct 2017, at 1:26, Jonas Kemper wrote:<br>
</p>
<blockquote style="border-left:2px solid #777; color:#BBB; margin:0 0 5px; padding-left:5px; border-left-color:#BBB"><p dir="auto">Has anybody dealt with this before? My ideal scenario would be control elements to respond with "yes/no/maybe" in Mailmate whenever a meeting invite comes in.</p>
</blockquote><p dir="auto">It seems you got a couple of somewhat promising replies. I cannot offer to look into the RFCs and what exactly needs to be done to make this work, but if someone does this part of the work then I promise to help making it into a bundle including adding any features needed to do that.<br>
</p>
</blockquote><p dir="auto">Benny, I'm willing to give it a try. A couple of questions before beginning:<br>
<br>
- How does the bundle call the script? What kind of information would be available and how are they passed? In particular I would need:<br>
- the email account this was sent to/the account that received it;<br>
- the attachment (i.e. the invite);<br>
- the status<br>
- optionally a remark.<br>
- And how does mailmate parse the reply? For example the invite needs to be encoded in base64.<br>
- Is there a preference for programming languages? I'm mostly familiar with Python.</p>
</blockquote></div>
<div style="white-space:normal">
<p dir="auto">ruby is what most command uses but anything default installed on osx is fine (which python are afaik).</p>
<p dir="auto">about how commands call things then its fairly simple - the best article about I know is <a href="http://1klb.com/posts/2016/02/26/mailmate-bundles/" style="color:#3983C4">http://1klb.com/posts/2016/02/26/mailmate-bundles/</a></p>
<p dir="auto">but in short using my org-mode bundle as example then you have:</p>
<p dir="auto">A <a href="https://github.com/mailmate/org-mode.mmbundle/blob/master/info.plist" style="color:#3983C4">plist</a> file to describe the extension - see the link above for how to make that</p>
<p dir="auto">A <a href="https://github.com/mailmate/org-mode.mmbundle/blob/master/Commands/Add%20With%20Summary.mmCommand" style="color:#3983C4">mmCommand</a> to define the action - here you'll see MM_* env vars being set using mail mates syntax for accessing elements. That is used to pass content to the scripts. <br>
Since you need encoded you probably want to use "decoded" for how you want your input/output.</p>
<p dir="auto">And then your <a href="https://github.com/mailmate/org-mode.mmbundle/blob/master/Support/bin/add" style="color:#3983C4">actual script</a> which will be able to get the various MM_* vars.</p>
</div>
<div style="white-space:normal"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto">You can all have a look [here](<a href="https://stackoverflow.com/questions/4823574/sending-meeting-invitations-with-python" style="color:#777">https://stackoverflow.com/questions/4823574/sending-meeting-invitations-with-python</a>) for a minimal Python implementation.<br>
<br>
Replying is much easier though: you just need to change the content of one line of the invite (assuming no notes are added).</p>
</blockquote></div>
<div style="white-space:normal">
<p dir="auto">hope that helps.</p>
</div>
</div>
</body>
</html>