nf-core / nf-core/tools

Fail to send the completion email

Open
#3,080 1 comment 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #3304 by @robsyme — merged
bug
Dominant language
Python
Stars
322
Forks
255
Avg merge
2d 3h
Merged PRs (30d)
5

Description

Description of the bug

I created a new project via nf-core create (v2.14.1) and run the template pipeline with

nextflow run . -profile test,conda --outdir results --email [xxx.email.com](http://xxx.email.com/)

command on both nextflow 24.4 and 23.4 but the email cannot be delivered. I manually tuned the code and find that sendmail_html variable has length = 0, so it seems the html render engine (groovy.text.GStringTemplateEngine) has some problems behind.

def max_multiqc_email_size = (params.containsKey('max_multiqc_email_size') ? params.max_multiqc_email_size : 0) as nextflow.util.MemoryUnit
def smail_fields           = [ email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, projectDir: "${workflow.projectDir}", mqcFile: mqc_report, mqcMaxSize: max_multiqc_email_size.toBytes() ]
def sf                     = new File("${workflow.projectDir}/assets/sendmail_template.txt")
def sendmail_template      = engine.createTemplate(sf).make(smail_fields)
def sendmail_html          = sendmail_template.toString()

In the meantime, If I created the new project via nf-core v2.8 with the lib directory for addressing the email, there is no such problem.

Command used and terminal output
nextflow run . -profile test,conda --outdir results --email xxx.email.com
System information

Nextflow version: both 23.04.4 and 24.04
Hardware: HPC
Executor: local
Container engine: both conda and singularity
OS: rhel linux-8
Python version: 3.9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported nf-core create project and email command, then inspect the generated assets/sendmail_template.txt and the template-rendering path that produces sendmail_html. Compare the generated output with a project created using nf-core tools v2.8; done means the completion email renders and is delivered successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.