mirror of
https://github.com/kou029w/_.git
synced 2025-02-04 08:08:38 +00:00
Compare commits
No commits in common. "a115c1a929a8f89d4fc0fea0bb3b0874ac4de340" and "e3843f842a499baa4544b070cf7bb0c5a563aa0a" have entirely different histories.
a115c1a929
...
e3843f842a
7 changed files with 0 additions and 95 deletions
|
@ -1,6 +0,0 @@
|
|||
```
|
||||
docker compose up -d
|
||||
# http://localhost:8025 にアクセスして確認
|
||||
pnpm i
|
||||
node index.mjs
|
||||
```
|
|
@ -1,19 +0,0 @@
|
|||
services:
|
||||
# maildev:
|
||||
# image: maildev/maildev
|
||||
# ports:
|
||||
# - "1080:1080" # Web UI
|
||||
# - "1025:1025"
|
||||
# environment:
|
||||
# MAILDEV_INCOMING_USER: postmaster
|
||||
# MAILDEV_INCOMING_PASS: password
|
||||
mailpit:
|
||||
image: axllent/mailpit
|
||||
ports:
|
||||
- "8025:8025" # Web UI
|
||||
- "1025:1025"
|
||||
environment:
|
||||
MP_SMTP_AUTH_FILE: /etc/mailpit/auth
|
||||
MP_SMTP_AUTH_ALLOW_INSECURE: "true"
|
||||
volumes:
|
||||
- ./etc/mailpit:/etc/mailpit:ro
|
|
@ -1 +0,0 @@
|
|||
postmaster:password
|
|
@ -1,20 +0,0 @@
|
|||
import nodemailer from "nodemailer";
|
||||
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: "localhost",
|
||||
port: 1025,
|
||||
secure: false,
|
||||
auth: {
|
||||
user: "postmaster",
|
||||
pass: "password",
|
||||
},
|
||||
});
|
||||
|
||||
const info = await transporter.sendMail({
|
||||
from: "foo <foo@example.com>",
|
||||
to: "bar <bar@example.com>",
|
||||
subject: "Hello world!",
|
||||
html: "<marquee>Hello world.</marquee>",
|
||||
});
|
||||
|
||||
console.log(info.messageId);
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"name": "nodemailer",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "Kohei Watanabe <kou029w@gmail.com>",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"nodemailer": "^6.9.4"
|
||||
}
|
||||
}
|
13
nodemailer/pnpm-lock.yaml
generated
13
nodemailer/pnpm-lock.yaml
generated
|
@ -1,13 +0,0 @@
|
|||
lockfileVersion: '6.0'
|
||||
|
||||
devDependencies:
|
||||
nodemailer:
|
||||
specifier: ^6.9.4
|
||||
version: 6.9.4
|
||||
|
||||
packages:
|
||||
|
||||
/nodemailer@6.9.4:
|
||||
resolution: {integrity: sha512-CXjQvrQZV4+6X5wP6ZIgdehJamI63MFoYFGGPtHudWym9qaEHDNdPzaj5bfMCvxG1vhAileSWW90q7nL0N36mA==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
dev: true
|
|
@ -1,21 +0,0 @@
|
|||
import nodemailer from "nodemailer";
|
||||
|
||||
// see https://support.sendgrid.kke.co.jp/hc/ja/articles/204187885-SMTP%E3%81%AE%E6%8E%A5%E7%B6%9A%E6%83%85%E5%A0%B1%E3%82%92%E6%95%99%E3%81%88%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84-
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: "smtp.sendgrid.net",
|
||||
port: 465,
|
||||
secure: true,
|
||||
auth: {
|
||||
user: "apikey",
|
||||
pass: "SG.****", // https://app.sendgrid.com/settings/api_keys > Create API Key > Mail Send > Custom Access > Mail Send
|
||||
},
|
||||
});
|
||||
|
||||
const info = await transporter.sendMail({
|
||||
from: "foo@example.org",
|
||||
to: "bar@example.org",
|
||||
subject: "Hello world!",
|
||||
html: "<marquee>Hello world.</marquee>",
|
||||
});
|
||||
|
||||
console.log(info.messageId);
|
Loading…
Add table
Reference in a new issue