mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2024-11-10 05:51:07 +07:00
main: style fix
This commit is contained in:
parent
c938b3cb85
commit
b738850ab1
6
main.js
6
main.js
@ -1,7 +1,7 @@
|
|||||||
const nodemailer = require("nodemailer")
|
const nodemailer = require("nodemailer")
|
||||||
const core = require("@actions/core")
|
const core = require("@actions/core")
|
||||||
const fs = require("fs")
|
const fs = require("fs")
|
||||||
const showdown = require('showdown')
|
const showdown = require("showdown")
|
||||||
|
|
||||||
function getBody(bodyOrFile, convertMarkdown) {
|
function getBody(bodyOrFile, convertMarkdown) {
|
||||||
let body = bodyOrFile
|
let body = bodyOrFile
|
||||||
@ -22,7 +22,7 @@ function getBody(bodyOrFile, convertMarkdown) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getFrom(from, username) {
|
function getFrom(from, username) {
|
||||||
if (from.match(/.+<.+@.+>/)) {
|
if (from.match(/.+ <.+@.+>/)) {
|
||||||
return from
|
return from
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ async function main() {
|
|||||||
rejectUnauthorized: false
|
rejectUnauthorized: false
|
||||||
} : undefined
|
} : undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
const info = await transport.sendMail({
|
const info = await transport.sendMail({
|
||||||
from: getFrom(from, username),
|
from: getFrom(from, username),
|
||||||
to: to,
|
to: to,
|
||||||
|
Loading…
Reference in New Issue
Block a user