question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No email by template sent if from is empty

See original GitHub issue

Hi,

Faced an issue with transactional emails. When I send an email with non-empty ‘TemplateID’ and empty ‘From’ I get the 200 OK response but no email on my mailbox. But all works as expected for the same setup and non-empty ‘From’ property.

This code doesn’t work.

require('node-mailjet').connect('...', '...')
  .post('send', {'version': 'v3.1'})
  .request({
    Messages: [
      {
        To: [
          {
            Email: '...',
            Name: '...'
          }
        ],
        TemplateID: ...,
        TemplateLanguage: true,
        Variables: {
          ...
        }
      }
    ]
  })

But the same with ‘From’ works. Email, Name and Subject are set for the template.

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
eilgincommented, Oct 29, 2018

1 year after, the bug still exists! Could you fix this issue as your docs specifically state that we can rely on the “From” info given in the template if the “From” wasn’t explicitely set?

Or at least, fix your docs to remove this feat.

4reactions
maganapcommented, Dec 18, 2017

Is there any plan to fix this? I have different senders by template, and having those in the source code is not a practical option.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PHP Form: If a input field is empty then do not send the table ...
Here I have given only name, email, and address fields as required in HTML, and the remaining fields are can be left empty...
Read more >
Do not send email if table is empty - Power Platform Community
Having an issue where it keeps sending the email with the empty table. I want it to stop the flow when it checks...
Read more >
Body is empty when sending email to a user from apex with ...
I want to send emails from apex, I'm using Visualforce email templates. This is my code: EmailTemplate templateId = [Select id from ...
Read more >
Receiving Empty email - apex - Salesforce Stack Exchange
I think once you provide the code with some part of mail(like subject, body) then it ignores the template. Share.
Read more >
Email template results in empty field data | Customer ...
Any idea why the fields aren't pulling the data in when the email actually gets to my inbox? I'm not sure what to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found