Skip to content

Commit 808446b

Browse files
committed
Sync emailing system to nf-core/tools
1 parent 088d0c7 commit 808446b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

main.nf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2929,11 +2929,12 @@ workflow.onComplete {
29292929
log.info "[nf-core/eager] Sent summary e-mail to $email_address (sendmail)"
29302930
} catch (all) {
29312931
// Catch failures and try with plaintext
2932-
if ( mqc_report.size() <= params.max_multiqc_email_size.toBytes() ) {
2933-
[ 'mail', '-s', subject, email_address, '--content-type=text', '-A', mqc_report ].execute() << email_txt
2934-
} else {
2935-
[ 'mail', '-s', subject, email_address, '--content-type=text' ].execute() << email_txt
2932+
def mail_cmd = [ 'mail', '-s', subject, email_address ]
2933+
def mail_cmd = [ 'mail', '-s', subject, '--content-type=text', email_address ]
2934+
if ( mqc_report.size() <= params.max_multiqc_email_size.toBytes() ) {
2935+
mail_cmd += [ '-A', mqc_report ]
29362936
}
2937+
mail_cmd.execute() << email_txt
29372938
log.info "[nf-core/eager] Sent summary e-mail to $email_address (mail)"
29382939
}
29392940
}

0 commit comments

Comments
 (0)