Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
aws-ses-v2-local
Advanced tools
Readme
A local version of Amazon Simple Email Service (AWS SES) supporting both the V1 API and the V2 API. Currently focuses on the SendEmail and SendRawEmail endpoints.
Are you using serverless-offline? You might be interested in serverless-offline-ses-v2.
HTML emails | Dark theme |
---|---|
GET /store
GET /health-check
npm install aws-ses-v2-local
Run it as a command line tool (in your package.json scripts, or install it globally with npm install -g aws-ses-v2-local
)
aws-ses-v2-local
Alternatively, you can import it and run it yourself (along with optional config for the port):
import server from 'aws-ses-v2-local'
server({ port: 8005 })
console.log('aws-ses-v2-local: server up and running')
You can treat the server as an AWS SES endpoint. See the starter for your language:
import { SESv2Client, SendEmailCommand } from "@aws-sdk/client-sesv2"
const ses = new SESv2Client({
endpoint: 'http://localhost:8005',
region: 'aws-ses-v2-local',
credentials: { accessKeyId: 'ANY_STRING', secretAccessKey: 'ANY_STRING' },
});
await ses.send(new SendEmailCommand({
FromEmailAddress: 'sender@example.com',
Destination: { ToAddresses: ['receiver@example.com'] },
Content: {
Simple: {
Subject: { Data: 'This is the subject' },
Body: { Text: { Data: 'This is the email contents' } },
}
},
}))
import { SES, SendEmailCommand } from '@aws-sdk/client-ses'
const ses = new SES({
endpoint: 'http://localhost:8005',
region: 'aws-ses-v2-local',
credentials: { accessKeyId: 'ANY_STRING', secretAccessKey: 'ANY_STRING' },
})
await ses.send(new SendEmailCommand({
Source: 'sender@example.com',
Destination: { ToAddresses: ['receiver@example.com'] },
Message: {
Subject: { Data: 'This is the subject' },
Body: { Text: { Data: 'This is the email contents' } },
},
}))
import AWS from 'aws-sdk'
const ses = new AWS.SESV2({
endpoint: 'http://localhost:8005',
region: 'aws-ses-v2-local',
credentials: { accessKeyId: 'ANY_STRING', secretAccessKey: 'ANY_STRING' },
})
ses.sendEmail({
FromEmailAddress: 'sender@example.com',
Destination: { ToAddresses: ['receiver@example.com'] },
Content: {
Simple: {
Subject: { Data: 'This is the subject' },
Body: { Text: { Data: 'This is the email contents' } },
}
},
})
import * as aws from '@aws-sdk/client-ses'
const ses = new aws.SES({
endpoint: 'http://localhost:8005',
region: 'aws-ses-v2-local',
credentials: { accessKeyId: 'ANY_STRING', secretAccessKey: 'ANY_STRING' },
})
const transporter = nodemailer.createTransport({ SES: { ses, aws } })
await transporter.sendMail({
from: 'sender@example.com',
to: ['receiver@example.com'],
subject: 'This is the subject',
text: 'This is the email contents',
attachments: [{
filename: `some-file.pdf`,
contentType: 'application/pdf',
content: Buffer.from(pdfBytes),
}],
})
Using another language or version? Submit a PR to update this list :)
Navigate to the address and port where the server is running in your browser (e.g. localhost:8005
).
A Dockerfile that bakes the /dist/cli.js
is provided. There is also a docker-compose.example.yml
template to create a container running the aws-ses-v2-local mock server.
FAQs
A local version of Amazon Simple Email Service (AWS SES) supporting the V2 API
The npm package aws-ses-v2-local receives a total of 3,326 weekly downloads. As such, aws-ses-v2-local popularity was classified as popular.
We found that aws-ses-v2-local demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.