Skip to content
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.2 #560

Closed
8 tasks done
andris9 opened this issue Feb 2, 2016 · 12 comments
Closed
8 tasks done

v2.2 #560

andris9 opened this issue Feb 2, 2016 · 12 comments
Assignees
Milestone

Comments

@andris9
Copy link
Member

andris9 commented Feb 2, 2016

This is the tracking issue for the next Nodemailer version, v2.2.0.

Planned release date: N/A

Planned features/updates (might change):

  • Add some kind of an option to use proxies when connecting to SMTP servers. This has been asked a lot through the years but currently it is not even possible to add a custom proxy handler without overwriting the SMTP modules. I'm not sure if I'm going to add full-blown proxy support right away but the option to add custom socket handlers should be available. Related issue: Proxy support #555 (v2.2.0-beta.2)
  • Better calendar (ICS) support. There has been several complaints about ICS calendar handling (must be alternative, not an attachment). I'm not sure at this point what is actually wrong in the handling or is there something wrong at all, maybe it's just a configuration issue. Related issue: attachment headers being ignored/overridden #559 (v2.2.0-beta.1)
  • Configuration validator. An utility function that can be called to see if current transport object can actually connect and log in to the SMTP server or not. Should also check for problems with TLS etc. (Idea borrowed from here). (v2.2.0-beta.6)
  • Add new transport type: IMAP. Useful when uploading sent messages to the Sent folder in IMAP. this should be handled by an external plugin, related issue: Add new transport type: IMAP #561
  • Allow sending pre-generated mime messages. Instead of taking input object amd converting it to a rfc822 mime message, take a string or Buffer as an input and pass it directly to SMTP. This is mostly useful for testing (v2.2.0-beta.0)
  • Add helpers for the List-* headers. Instead of formatting headers manually, just provide the values (v2.2.0-beta.5)
  • Do not blindly use quoted-printable for everything. Quoted-printable makes no sense for non-latin alphabet languages (v2.2.0-beta.2)
  • Always prefer STARTTLS for direct connections, fallback to plaintext if STARTTLS fails (v2.2.0-beta.6)
@andris9 andris9 self-assigned this Feb 2, 2016
@andris9 andris9 added this to the v2.2 milestone Feb 2, 2016
@andris9
Copy link
Member Author

andris9 commented Feb 5, 2016

Added new message option raw to be able to send pre-generated mime messages. Released as v2.2.0-beta.0

Install with npm install nodemailer@beta

transport.sendMail({
    raw: 'Content-Type: text/plain\r\nSubject: Test\r\n\r\nHello world!',
    // envelope needs to be set as raw is not processed
    envelope: {
        from: '[email protected]',
        to: '[email protected]'
    }
});

@andris9
Copy link
Member Author

andris9 commented Feb 6, 2016

Released v2.2.0-beta.1 that adds new message option icalEvent for using embedded iCalendar events.

var message = {
    from: '"Sender Name" <[email protected]>',
    to: '"Receiver Name" <[email protected]>',
    subject: 'Calendar invite',
    text: 'This message contains a calendar event',
    icalEvent: {
        method: 'request',
        // content can be a string, a buffer or a stream
        // alternatively you could use `path` that points to a file or an url
        content: 'BEGIN:VCALENDAR\r\nPRODID:-//ACME/DesktopCalendar//EN\r\n...'
    }
};

@andris9
Copy link
Member Author

andris9 commented Feb 10, 2016

Released v2.2.0-beta.2 that adds support for proxied sockets. See full example for using SOCKS5 here.

Nodemailer does not have built-in knowledge about different proxy protocols. Instead it provides a mechanism for using custom sockets which can be created with some proxy module, eg. socks.

transporter.getSocket = function(options, callback){
    getNewSocketSomehow(options.port, options.host, function(err, socket){
        if(err){
            return callback(err);
        }
        callback(null, {
            connection: socket
        });
    });
};

@andris9
Copy link
Member Author

andris9 commented Feb 10, 2016

v2.2.0-beta.5 has support for List-* headers

var mailOptions = {
    list: {
        // List-Help: <mailto:[email protected]?subject=help>
        help: '[email protected]?subject=help',
        // List-Unsubscribe: <http:https://example.com> (Comment)
        unsubscribe: {
            url: 'http:https://example.com',
            comment: 'Comment'
        },
        // List-Subscribe: <mailto:[email protected]?subject=subscribe>
        // List-Subscribe: <http:https://example.com> (Subscribe)
        subscribe: [
            '[email protected]?subject=subscribe',
            {
                url: 'http:https://example.com',
                comment: 'Subscribe'
            }
        ],
        // List-Post: <http:https://example.com/post>, <mailto:[email protected]?subject=post> (Post)
        post: [
            [
                'http:https://example.com/post',
                {
                    url: '[email protected]?subject=post',
                    comment: 'Post'
                }
            ]
        ]
    }
};

@andris9
Copy link
Member Author

andris9 commented Feb 10, 2016

I'm not sure anymore that the List-* thing should be built into Nodemailer, I should probably consider moving it into a plugin instead.

@andris9
Copy link
Member Author

andris9 commented Feb 11, 2016

Released v2.2.0-beta.1 with simple configuration verifier

// verify connection configuration
transporter.verify(function(error, success) {
   if (error) {
        console.log(error);
   } else {
        console.log('Server is ready to take our messages');
   }
});

@andris9
Copy link
Member Author

andris9 commented Feb 11, 2016

I have closed all the issues related to v2.2, so I can publish a rc version. Probably going to wait until tomorrow with the rc in case I'm going to have some new ideas of what to put into this release.

@andris9
Copy link
Member Author

andris9 commented Feb 12, 2016

Released v2.2.0-rc.7. Expected stable release date: February 19.

@andris9
Copy link
Member Author

andris9 commented Feb 17, 2016

v2.2.0-rc.11 makes the dependency tree a bit smaller as there is no need for clone anymore. Instead a more simpler homegrown method is used that only makes shallow copies

@andris9
Copy link
Member Author

andris9 commented Feb 18, 2016

Stable release was planned for tomorrow but I don't have time for it then, so I published v2.2.0 already today.

Release blog post can be found here

@andris9 andris9 closed this as completed Feb 18, 2016
@bertho-zero
Copy link

How to convert List-* headers now ?

@bertho-zero
Copy link

I am not able to add a comment containing an accent to my List-Unsubscribe header, I do not see how to encode it with the current version of nodemailer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants