Mercurial > repos > brinkmanlab > sendmail
changeset 0:126f37fe9f20 draft default tip
"planemo upload for repository https://github.com/brinkmanlab/galaxy-tools/tree/master/sendmail commit 33b02e08cbc8f76fb4b8537f8c968393f85a1b5e"
author | brinkmanlab |
---|---|
date | Fri, 24 Jan 2020 17:47:27 -0500 |
parents | |
children | |
files | sendmail.xml |
diffstat | 1 files changed, 49 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sendmail.xml Fri Jan 24 17:47:27 2020 -0500 @@ -0,0 +1,49 @@ +<tool id="sendmail" name="Send Email" version="1.0" profile="16.04"> + <description>Send mail using templates and include information about datasets</description> + <command><![CDATA[ + #from galaxy.util import send_mail + $send_mail($__app__.config.email_from, $to, $subject, "", $__app__.config, open($body).read()) + ]]></command> + <configfiles> + <configfile name="body"><![CDATA[ + #set $template_path = '/'.join([$__tool_data_path__, "sendmail", $template]) + #import os + #if '..' not in $template and $os.path.isfile($template_path) + #include $template_path + #else + <html> + <body> + $data.name is now complete. + #if $hasattr(__app__.config, "public_url") + You can view it <a href="${__app__.config.public_url}/datasets/${data.dataset.id}/display">here</a>. + #end if + </body> + </html> + #end if + ]]></configfile> + </configfiles> + <inputs> + <param name="data" type="data" format="data" multiple="true" label="Data" /> + <param name="to" type="text" label="To" /> + <param name="subject" type="text" value="Job complete" label="Subject" /> + <repeat name="extras" title="Extras"> + <param name="extra" type="text" label="Extra data to make available in the template body" /> + </repeat> + <param name="template" type="text" value="template.html" label="Template" help="Relative path of template to use in tool-data/sendmail/" /> + </inputs> + <help><![CDATA[ + Send mail using templates and include information about datasets. + + Templates are parsed using Galaxies Cheeta Template Engine. The variables available are everything that is available to a tool including: + - $data Dataset instance passed to the tool input + - $to Reciepent address specified in the tool parameters + - $subject Subject specified in the tool parameters + - $extras[].extra List of extras specified in the tool parameters + - $template Relative path to the current template + + See this tools xml for an example template. + ]]></help> + <citations> + <citation type="doi">10.5281/zenodo.3364789</citation> + </citations> +</tool>