mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2025-07-22 14:53:42 +07:00
* Added ability to adjust priority to the mail message (#66) Co-authored-by: John Pastore <cbbm142@github.com> Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com>
This commit is contained in:
4
main.js
4
main.js
@ -47,6 +47,7 @@ async function main() {
|
||||
const attachments = core.getInput("attachments", { required: false })
|
||||
const convertMarkdown = core.getInput("convert_markdown", { required: false })
|
||||
const ignoreCert = core.getInput("ignore_cert", { required: false })
|
||||
const priority = core.getInput("priority", { required: false })
|
||||
|
||||
if (!username || !password) {
|
||||
core.warning("Username and password not specified. You should only do this if you are using a self-hosted runner to access an on-premise mail server.")
|
||||
@ -74,7 +75,8 @@ async function main() {
|
||||
replyTo: replyTo ? replyTo : undefined,
|
||||
text: body ? getBody(body, false) : undefined,
|
||||
html: htmlBody ? getBody(htmlBody, convertMarkdown) : undefined,
|
||||
attachments: attachments ? attachments.split(',').map(f => ({ path: f.trim() })) : undefined
|
||||
attachments: attachments ? attachments.split(',').map(f => ({ path: f.trim() })) : undefined,
|
||||
priority: priority ? priority : undefined,
|
||||
})
|
||||
} catch (error) {
|
||||
core.setFailed(error.message)
|
||||
|
Reference in New Issue
Block a user