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

Session already started. #28

Open
hotfusion opened this issue Mar 12, 2024 · 0 comments
Open

Session already started. #28

hotfusion opened this issue Mar 12, 2024 · 0 comments

Comments

@hotfusion
Copy link

hotfusion commented Mar 12, 2024

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.

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

1 participant