0

フォームの応答を保存する Google スプレッドシートを使用しています。少しの間は機能していましたが、終了したばかりで、次のエラーがあるというメールを受け取っています。

メソッド (クラス)(クラス)sendEmail(文字列、文字列、文字列、文字列、オブジェクト) が見つかりません。(32行目、ファイル「コード」)

スプレッドシートの最初の列にはタイムスタンプが保持され、データはその直後に保存されます。以下にコードを貼り付けました。

function onFormSubmit(e) {
   var name = e.values[1];
   var department = e.values[2];
   var email = e.values[3];
   var phone = e.values[4];
   var project = e.values[5];
   var title = e.values[6];
   var description = e.values[7];
   var reach = e.values[8];
   var goal = e.values[9];
   var time = e.values[10];
   var work = e.values[11];


  // change this address to be the address where you want the notification to go 
   var to = "dreamsites.designs@gmail.com, nuwish4u@yahoo.com";
   var subject = "Intake Form Notification";
   var message = "Your Name: " + name + "\n \n";
       message += "Department: " + department + "\n \n";
       message += "Email: " + email + "\n \n";
       message += "Phone Number: " + phone + "\n \n";
       message += "Project title: " + title + "\n \n";
       message += "Project description: \n " + description + "\n \n";
       message += "Who are you trying to reach? \n" + reach + "\n \n";
       message += "Are you trying to achieve a specific goal with your communication efforts?  \n" + goal + "\n \n";
       message += "Is this request time sensitive? \n " + time + "\n \n";
       message += "Are you currently working with someone in Marketing & Communications?  \n" + work + "\n \n";
  var mailOptions = {
       name: name,
       replyTo: email,
   };
MailApp.sendEmail(to, subject, message, mailOptions);
}

私のトリガーはOnFormSubmitに設定されています>>スプレッドシートから>>フォーム送信時

4

1 に答える 1

1

小さな誤植だと思います。不要なコンマを削除できますかmailOptions

var mailOptions = {
       name: name,
       replyTo: email //Removed comma
   };
于 2013-07-02T16:52:14.063 に答える