mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2024-12-26 11:03:06 +07:00
main: specify enconding rather than converting buffer to string
This commit is contained in:
parent
ae7db41acb
commit
8c2729a391
2
main.js
2
main.js
@ -5,7 +5,7 @@ const fs = require("fs")
|
|||||||
function get_body(body) {
|
function get_body(body) {
|
||||||
if (body.startsWith("file://")) {
|
if (body.startsWith("file://")) {
|
||||||
body = body.replace("file://", "")
|
body = body.replace("file://", "")
|
||||||
body = fs.readFileSync(body).toString()
|
body = fs.readFileSync(body, "utf8")
|
||||||
}
|
}
|
||||||
|
|
||||||
return body
|
return body
|
||||||
|
Loading…
Reference in New Issue
Block a user