# Kintoneアプリの添付ファイルをoutlookに挿入したい

**URL:** <https://community.cybozu.dev/t/topic/48>\
**Category:** kintone 開発相談\
**Created:** [2022 年 9 月 12 日午前 3:50 UTC](https://community.cybozu.dev/t/topic/48 "2022-09-12T03:50:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Legacy\_Account1960](https://avatars.discourse-cdn.com/v4/letter/l/82dd89/32.png) [@Legacy\_Account1960](https://community.cybozu.dev/u/Legacy_Account1960)\
**Post date:** [2022 年 9 月 12 日午前 3:50 UTC](https://community.cybozu.dev/t/topic/48/1 "2022-09-12T03:50:32Z")

</div>

いつもお世話になっております。

以下URLでKintoneの文字列1行の値をoutlookに転記することができました。

[https://developer.cybozu.io/hc/ja/articles/201255214-%E7%AB%8B%E3%81%A1%E4%B8%8A%E3%81%92%E3%81%9F%E3%83%A1%E3%83%BC%E3%83%AB%E3%82%BD%E3%83%95%E3%83%88%E3%81%ABkintone%E3%81%AE%E6%83%85%E5%A0%B1%E3%82%92%E3%82%BB%E3%83%83%E3%83%88%E3%81%99%E3%82%8B%E3%83%AF%E3%82%B6](https://community.cybozu.dev/hc/ja/articles/201255214-%E7%AB%8B%E3%81%A1%E4%B8%8A%E3%81%92%E3%81%9F%E3%83%A1%E3%83%BC%E3%83%AB%E3%82%BD%E3%83%95%E3%83%88%E3%81%ABkintone%E3%81%AE%E6%83%85%E5%A0%B1%E3%82%92%E3%82%BB%E3%83%83%E3%83%88%E3%81%99%E3%82%8B%E3%83%AF%E3%82%B6)

ですが、「mailto」プロトコルは添付ファイルに対してのoutlook挿入はできないようでして。

&nbsp;

～やりたいこと～

メール送信ボタンを押下後、添付ファイルをoutlookに挿入する

フィールドコード

添付ファイル：attachment

タイトル：mail\_title

詳細：mail\_detail

&nbsp;

作成中のコードです（これでタイトルと詳細をoutlookに挿入することはできました）

////////////////////////////////////////////  
//メール送信ボタン  
////////////////////////////////////////////  
(() =\> {  
&nbsp; &nbsp; ‘use strict’;  
kintone.events.on(‘app.record.detail.show’, function (event) {  
&nbsp; &nbsp; //レコード詳細画面右側の空白部分の要素を取得  
&nbsp; &nbsp; var el = kintone.app.record.getHeaderMenuSpaceElement()  
&nbsp; &nbsp; //文字列フィールドの取得  
&nbsp; &nbsp; var title = event[‘record’][‘mail\_title’][‘value’];  
&nbsp; &nbsp; var honbun = event[‘record’][‘mail\_detail’][‘value’];  
&nbsp; &nbsp; var send\_Flie = event[‘record’][‘attachment’][‘value’];  
&nbsp; &nbsp; &nbsp; &nbsp; //aタグの生成  
&nbsp; &nbsp; var link = document.createElement(‘a’);  
&nbsp; &nbsp; link.style.width = ‘30%’;  
&nbsp; &nbsp; link.style.width = ‘30%’;  
&nbsp; &nbsp; link.style.height = ‘30%’;  
&nbsp; &nbsp; link.style.textAlign = ‘center’;  
&nbsp; &nbsp; link.style.fontSize = ‘15px’;  
&nbsp; &nbsp; link.style.fontWeight = ‘bold’;  
&nbsp; &nbsp; link.href = ‘mailto:’ + ‘’ + ‘?subject=’ + title + ‘&body=’ + honbun + ‘&file’ + send\_Flie; link.id = ‘Send’; link.name = ‘mailSend’;  
&nbsp; &nbsp; //要素の追加  
&nbsp; &nbsp; el.appendChild(link);  
&nbsp; &nbsp; link.appendChild(document.createTextNode(’ メール送信 '));  
});  
&nbsp; &nbsp; return event  
})();

&nbsp;

&nbsp;

特にmailtoにこだわっているわけではございません。

もしほかの方法があれば、ご教授頂きたいです。

---

<div class="post-metadata">

**Author:** ![Legacy\_Account1969](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@Legacy\_Account1969](https://community.cybozu.dev/u/Legacy_Account1969)\
**Post date:** [2022 年 9 月 16 日午前 6:40 UTC](https://community.cybozu.dev/t/topic/48/2 "2022-09-16T06:40:12Z")

</div>

メール送信のプラグインはどうでしょうか？

自力でメールのAPI探して実装するという方法もあると思いますが、  
プラグインを使ったほうが早いと思います。

---

<div class="post-metadata">

**Author:** ![Legacy\_Account1960](https://avatars.discourse-cdn.com/v4/letter/l/82dd89/32.png) [@Legacy\_Account1960](https://community.cybozu.dev/u/Legacy_Account1960)\
**Post date:** [2022 年 11 月 8 日午前 11:19 UTC](https://community.cybozu.dev/t/topic/48/3 "2022-11-08T11:19:43Z")

</div>

らいとさん

返事が遅れてしまい、失礼いたしました。

プラグインも検討したのですがユーザー数の制約があって求めている機能が使え無さそうでした。

なんとかAPIで色々調べてはいるものの、KintoneではなくKMailerなどの解決法が出てきます。

引き続き色々調べてみます。

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/cybozu/original/1X/d5c841c3c5a6cb66eed514001c1b45147c9e1f4f.png) [@system](https://community.cybozu.dev/u/system)\
**Post date:** [2024 年 6 月 3 日午前 2:32 UTC](https://community.cybozu.dev/t/topic/48/4 "2024-06-03T02:32:01Z")

</div>

このトピックはベストアンサーに選ばれた返信から 3 日が経過したので自動的にクローズされました。新たに返信することはできません。
