
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Connect to an SMTP server and send e-mails, authenticated or not. You can use the Client
class
or the sendmail
function. The later is recomended.
sendmail({
"host" : "mail.example.com",
"from" : "john@example.com",
"to" : [ "jane@example.com", "doe@example.com" ],
"auth" : [ "john", "secret" ],
"content" : {
"subject" : "Hello Jane!",
"content-type" : "text/html",
"content" : "Hello <strong>Jane</strong>!"
},
"success" : function () {
console.log("Sent!");
},
"failure" : function (err) {
console.log("Error(%d): %s", err.code, err.message);
}
});
host
(default = "127.0.0.1"): Server to connect to;port
(default = 25): Server port to connect to;auth
(optional): Authentication to use. Should be an array with username, password and
method (optional). Methods supported: PLAIN, LOGIN and CRAM-MD5 (default);from
(default = "root@localhost"): Origin e-mail.to
: Destination e-mail(s). It can be a string with 1 e-mail or an array with all the e-mails.content
: Content of the e-mail. It can be a string or an object with all the e-mail parts (or just 1).contentPath
: If you prefer, you can have the e-mail generated on a file and supply it instead of content
.success
(optional): Callback invoked when e-mail is successfully sent.failure
(optional): Callback invoked when some error ocurred.FAQs
Simple SMTP client for NodeJS
The npm package smtpc receives a total of 1 weekly downloads. As such, smtpc popularity was classified as not popular.
We found that smtpc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.