3

Google Apps スクリプトは以下のスプレッドシートで実行され、招待状の送信以外はすべて正常に機能しました。イベントを使用sendInvites:trueすると、カレンダーに作成され、ゲストが追加されますが、電子メールは送信されません。var advancedArgs同じ結果を使用せずに試しました。

 if (eventImported  != EVENT_IMPORTED && title != "") {  // Prevents importing duplicates
    var cal = CalendarApp.openByName('calendarname');
    var advancedArgs = {description: details, location: cust, guests:guestlist, sendInvites:true};

    cal.createEvent("10% Complete-->"+title, startDate, endDate, {description: details, location: cust, guests:guestlist, sendInvites:true});
    sheet.getRange(startcolumn + i, 9).setValue(EVENT_IMPORTED);
4

4 に答える 4

2

エラーは別の場所にあるはずです。この簡略化されたバージョンでコードをテストしたところ、期待どおりに招待状を受け取りました。(私はこのオプションを多くのスクリプトで問題なく使用しています)

ゲストリストを取得する方法を教えていただけますか? ドキュメントで指定されているように、カンマ区切りのメーリング リストですか?

function testcal(){
    var cal = CalendarApp.getDefaultCalendar()
    var advancedArgs = {description: 'details', location: 'here', guests:'serge@xxx.com', sendInvites:true};// change the email adress to a valid one that you have access to (but not your email adress of course !
    var startDate = new Date();// now
    var endDate = new Date(startDate.setHours(10));// at 10 AM, change this according to time of the day when you (eventually) test it
    cal.createEvent("test to delete", startDate, endDate, advancedArgs);
    }
于 2013-03-23T08:06:12.773 に答える
-1

試してみてください: var advancedArgs = {description: details, location: cust, guest:guestlist, sendInvites:"TRUE"};

于 2013-03-22T19:19:36.167 に答える