Skip to content

Instantly share code, notes, and snippets.

@sasaco
Last active May 13, 2017 10:24
Show Gist options
  • Save sasaco/635004932d7b0baab9af4c3226766cb6 to your computer and use it in GitHub Desktop.
Save sasaco/635004932d7b0baab9af4c3226766cb6 to your computer and use it in GitHub Desktop.
Slack から メールを送れるようにしてみた ~その1~ ref: http://qiita.com/sasaco/items/1bcb0a6f33ef3ca88394
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
}
];
{
"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