orliesaurus/nodemailer-mailgun-transport

Seems Ignoring headers

iamchathu opened this issue · 11 comments

I tried to send email adding

headers: {
            "List-Unsubscribe": "<mailto:unsubscribe-new-arrivals@unsub.domain>, <http://unsub.domain/member/unsubscribe/?listname=name&email=>"
        },

But it didn't sent with email

@iamchathu can you try:
'h:List-Unsubscribe': 'someemail@test.com'

@orliesaurus

Did you mean this?

headers: {
            'h:List-Unsubscribe': 'unsub@mydomain.tld'
        }

It didn't send the header still. I loaded original email and checked.

I found the documentation of nodemail regarding list options and tested it with below options but it also didn't work.

list: {
            // List-Help: <mailto:admin@example.com?subject=help>
            help: 'admin@example.com?subject=help',
            // List-Unsubscribe: <http://example.com> (Comment)
            unsubscribe: {
                url: 'http://unsub.example.com/'
                    // comment: 'Comment'
            }
        }

@iamchathu did you figure it out or do you still encounter difficulties with this feature?

@orliesaurus I still could get this sorted.

could or couldnt ?

Sorry I couldn't

i need help on that too.

Hello friends, @marcosgouvea @iamchathu - I tried to make it more clear in the below example

nodemailerMailgun.sendMail({
  from: 'myemail@example.com',
  to: 'recipient@domain.com',
  cc:'second@domain.com',
  bcc:'secretagent@company.gov',
  subject: 'Hey you, awesome!',
  'h:NAME-OF-YOUR-HEADER': 'SOME-HEADER-VALUE-123',
  html: '<b>HELLO WORLD</b>',
  text: 'HELLO'
}, function (err, info) {
  if (err) {
    console.log('Error: ' + err);
  }
  else {
    console.log('Response: ' + info);
  }
});

This is not working for sure, i tried everything with help and unsubscribe list headers but nothing. What would be the exact example of setting an unsubscribe header?
'h:List-Unsubscribe': 'SOME-HEADER-VALUE-123' ??

Hi @bajaga did u figure it out?

Try a similar approach to #70 (comment)