New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.1.0 #549

Closed
andris9 opened this Issue Jan 19, 2016 · 8 comments

Comments

Projects
None yet
2 participants
@andris9
Member

andris9 commented Jan 19, 2016

These are the planned changes for Nodemailer v2.1.0. There are going to be some new features (most probably templating support) but it is going to be backwards compatible, so it bumps only minor version.

Message headers

  • Make sure custom headers work the same in every cases (message root, attachments and alternatives) (v2.1.0-beta.0)
  • Array as an header value should be converted into several header rows with the same key (v2.1.0-beta.0)
var headers = {
    'X-My-Header': ['foo', 'bar']
}
/*
X-My-Header: foo
X-My-Header: bar
*/
  • Allow unprocessed headers (do not encode, do not fold etc.). (v2.1.0-beta.1)
var headers = {
    'X-My-Header': {
        prepared: true,
        value: 'do not fold or encode this value, pass it to message header as is'
    }
}

Misc

  • Message-Id should be auto generated immediatelly after sendMail is called and not wait until message starts streaming (v2.1.0-beta.0)

Templating

I still want to bring templating support to Nodemailer.

  • Add support for templates (v2.1.0-beta.2, details here, might change)
// create template based sender function
var sendPwdReminder = transporter.templateSender({
    // template fields
    subject: 'Password reminder for {{username}}!',
    text: 'Hello, {{username}}, Your password is: {{ password }}',
    html: '<b>Hello, <strong>{{username}}</strong>, Your password is:\n<b>{{ password }}</b></p>'
}, {
    // normal fields added to every message
    from: 'sender@example.com',
});

// use template based sender to send a message
sendPwdReminder({
    // normal fields added to this message
    to: 'receiver@example.com'
}, {
    // context values for template fields
    username: 'Node Mailer',
    password: '!"\'<>&some-thing'
}, function(err, info){
    if(err){
       console.log('Error');
    }else{
        console.log('Password reminder sent');
    }
});
  • Add support for custom renderers. This would probably mean supporting node-email-templates template objects (or actually any object with render(context, cb) method). (v2.1.0-beta.3)
var sendPwdReminder = transporter.templateSender(new EmailTemplate(templateDir));

@andris9 andris9 added this to the v2.1.0 milestone Jan 19, 2016

@andris9 andris9 self-assigned this Jan 19, 2016

@andris9

This comment has been minimized.

Member

andris9 commented Jan 19, 2016

Released v2.1.0-beta.0, install with npm install nodemailer@beta

@andris9

This comment has been minimized.

Member

andris9 commented Jan 20, 2016

Released v2.1.0-beta.1. Added prepared flag to custom headers to prevent processing of this header value

@andris9

This comment has been minimized.

Member

andris9 commented Jan 20, 2016

Released v2.1.0-beta.2. Implemented simple templating system. See details here

@andris9 andris9 changed the title from Tasks for v2.1.0 to v2.1.0 Jan 20, 2016

@ukriseq

This comment has been minimized.

ukriseq commented Jan 20, 2016

Hi,

Thanks for the awesome plugin. When sending content images inside html, the mail is rendering fine with the embedded images - but the mail is being shown as having attachments - when there are no attachments being sent - only content related images - Can u please fix this

@andris9

This comment has been minimized.

Member

andris9 commented Jan 20, 2016

@ukriseq could you create a separate issue for this. Also provide an example script that generates such messages

@andris9

This comment has been minimized.

Member

andris9 commented Jan 20, 2016

Released v2.1.0-rc.0 install with npm install nodemailer@beta. full docs.

This is a rc release, so if there will be no changes from now then the stable will be released on january 27th (stable is released 7 days after latest rc release).

@andris9

This comment has been minimized.

Member

andris9 commented Jan 25, 2016

Released v2.1.0-rc.1 where I sneaked in a few changes even though it is a rc.

  • If a SMTP pool is closed and it still has some pending messages in queue, these callbackes are returned with an error (so far these messages were kept hanging indefinitely)
  • tranporter object emits an 'idle' event for smtp pool if there are free connection slots available. Check if the tranporter is still idling with transporter.isIdle()
transporter.on('idle', function(){
    var message;
    while(transport.isIdle() && (message = retrieveNext())){
        transporter.sendMail(message);
    }
});

As updates were introduced, then stable release date is moved from january 27th to february 1st.

@andris9 andris9 referenced this issue Feb 1, 2016

Merged

V2.1 #558

@andris9

This comment has been minimized.

Member

andris9 commented Feb 1, 2016

v2.1.0 was released today

@andris9 andris9 closed this Feb 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment