mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2024-12-25 18:43:08 +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 core = require("@actions/core")
|
||||
const fs = require("fs")
|
||||
const showdown = require('showdown')
|
||||
const showdown = require("showdown")
|
||||
|
||||
function getBody(bodyOrFile, convertMarkdown) {
|
||||
let body = bodyOrFile
|
||||
@ -22,7 +22,7 @@ function getBody(bodyOrFile, convertMarkdown) {
|
||||
}
|
||||
|
||||
function getFrom(from, username) {
|
||||
if (from.match(/.+<.+@.+>/)) {
|
||||
if (from.match(/.+ <.+@.+>/)) {
|
||||
return from
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ async function main() {
|
||||
rejectUnauthorized: false
|
||||
} : undefined
|
||||
})
|
||||
|
||||
|
||||
const info = await transport.sendMail({
|
||||
from: getFrom(from, username),
|
||||
to: to,
|
||||
|
Loading…
Reference in New Issue
Block a user