-
-
Save sasaco/635004932d7b0baab9af4c3226766cb6 to your computer and use it in GitHub Desktop.
Slack から メールを送れるようにしてみた ~その1~ ref: http://qiita.com/sasaco/items/1bcb0a6f33ef3ca88394
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var json = JSON.parse(inputData.data); | |
var to_mail = (json.to.match(/([\w._-]+@[\w._-]+\.[\w._-]+)/gi) || [])[0]; | |
output = [ | |
{ | |
to : to_mail, | |
cc: json.cc, | |
bcc: json.bcc, | |
subject: json.subject, | |
body: json.body, | |
attachment: json.attachment | |
} | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"to": "***@*****.***", | |
"cc": null, | |
"bcc": null, | |
"subject": "ここに件名を入力", | |
"body": "ここにbodyを入力", | |
"attachment": 123 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment