DUPLICATE BODY with options

Posted by FlohGro, Last update almost 6 years ago

Duplicate the Body of the currently draft into your clipboard.
Based on a prompt you can select what to do with the draft Body:
Create a new draft in your inbox
Create a new draft and open it
Ignore it and just work with your clipboard

I use this to set titles for template drafts (like messages, contact data and so on) and use their content for mails or messaging.


  • clipboard

  • script

    var p = Prompt.create();
    p.title = "select final operation";
    p.message = "save or ignore?";
    p.addButton("save & open");
    p.isCancellable = false;
    if (p.buttonPressed  == "save" || p.buttonPressed == "save & open")
    var d = Draft.create();
    d.content = app.getClipboard();
    if (p.buttonPressed == "save")
    app.displaySuccessMessage("saved the draft to your inbox");
    } else if (p.buttonPressed == "ignore")
    app.displaySuccessMessage("saved the draft body to the clipboard");
    if (p.buttonPressed == "save & open")
    app.displaySuccessMessage("here is your new draft");


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