Action <-> Airmail

Posted by taglia, Last update over 2 years ago

Converts a message URL from (or Mailmate) to Airmail, and vice versa.


  • script

    // Cesare Tagliaferri 2022-04-11
    // Convert Airmail link to and back
    let selection = editor.getSelectedText();
    if (selection.startsWith('message:')) {
    	selection = selection.replace(/message:\/\/%3[cC]/,'');
    	selection = selection.replace(/%3[eE]$/,'');
    	selection = 'airmail://message?messageid=' + selection;
    } else if (selection.includes('messageid=')) {
    	selection = selection.replace(/.*messageid=/,'');
    	selection = decodeURIComponent(selection);
    	selection = 'message://%3c'+selection+'%3e'
    } else {
    	alert('The input is neither an Airmail nor a URL');


  • After Success Nothing
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.