fromをメールアドレスに統一(v5.0.3)
This commit is contained in:
parent
7f07710d23
commit
ad0d975a12
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "noticeuwuzu",
|
"name": "noticeuwuzu",
|
||||||
"version": "v5.0.2@uwuzu1.5.4",
|
"version": "v5.0.3@uwuzu1.5.4",
|
||||||
"description": "uwuzu Notice Bot",
|
"description": "uwuzu Notice Bot",
|
||||||
"main": "dist/main.js",
|
"main": "dist/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -300,7 +300,6 @@ async function event(earthquakeInfo: any): Promise<void> {
|
||||||
// メール送信
|
// メール送信
|
||||||
if (config.emergency.function) {
|
if (config.emergency.function) {
|
||||||
sendMail({
|
sendMail({
|
||||||
from: "noticeUwuzu自動送信",
|
|
||||||
to: config.emergency.mail.to,
|
to: config.emergency.mail.to,
|
||||||
subject: "【警告】震度6強以上の地震を受信しました",
|
subject: "【警告】震度6強以上の地震を受信しました",
|
||||||
html: `
|
html: `
|
||||||
|
|
|
@ -28,7 +28,6 @@ export default function successExit() {
|
||||||
|
|
||||||
if (config.emergency.mail.function) {
|
if (config.emergency.mail.function) {
|
||||||
sendMail({
|
sendMail({
|
||||||
from: "noticeUwuzu自動送信",
|
|
||||||
to: config.emergency.mail.to,
|
to: config.emergency.mail.to,
|
||||||
subject: "【警告】前回終了が不適切な可能性",
|
subject: "【警告】前回終了が不適切な可能性",
|
||||||
html: `
|
html: `
|
||||||
|
|
|
@ -4,7 +4,6 @@ import * as nodemailer from "nodemailer";
|
||||||
import type SMTPTransport from "nodemailer/lib/smtp-transport";
|
import type SMTPTransport from "nodemailer/lib/smtp-transport";
|
||||||
|
|
||||||
export interface EmailMessage {
|
export interface EmailMessage {
|
||||||
from: string;
|
|
||||||
to: string | string[];
|
to: string | string[];
|
||||||
subject: string;
|
subject: string;
|
||||||
text?: string;
|
text?: string;
|
||||||
|
@ -39,7 +38,7 @@ export default async function sendMail(message: EmailMessage): Promise<void> {
|
||||||
const transporter = await createTransporter();
|
const transporter = await createTransporter();
|
||||||
|
|
||||||
await transporter.sendMail({
|
await transporter.sendMail({
|
||||||
from: message.from,
|
from: config.emergency.mail.user,
|
||||||
to: Array.isArray(message.to) ? message.to.join(",") : message.to,
|
to: Array.isArray(message.to) ? message.to.join(",") : message.to,
|
||||||
subject: message.subject,
|
subject: message.subject,
|
||||||
text: message.text,
|
text: message.text,
|
||||||
|
|
Loading…
Reference in New Issue