node-mail icon indicating copy to clipboard operation
node-mail copied to clipboard

Session already started.

Open hotfusion opened this issue 4 months ago • 0 comments

I copied the example code:

/// mail -- send an email
//
// This is the simplest, safest way to send an email.  Headers are
// escaped and folded, email addresses are validated, and the body is
// validated and wrapped.

var sys = require('sys'),
    mail = require('../lib').Mail({
      host: 'smtp.gmail.com',
      username: '[email protected]',
      password: '**password**'
    });

mail.message({
    from: '[email protected]',
    to: ['[email protected]'],
    subject: 'Hello from Node.JS'
  })
  .body('Node speaks SMTP.')
  .send(function(err) {
    if (err) throw err;
    sys.debug('Sent!');
  });

once I run it, I am getting an error: Session already started.

hotfusion avatar Mar 12 '24 12:03 hotfusion