Mail Service
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
อีเมล
บริการนี้ช่วยให้สคริปต์ส่งอีเมลในนามของผู้ใช้ได้ ดูข้อมูลเพิ่มเติมได้ที่บริการ Gmail บริการอีเมลมีวัตถุประสงค์เพียงอย่างเดียวคือส่งอีเมล ซึ่งแตกต่างจากบริการ Gmail ที่เข้าถึงบัญชี Gmail ของผู้ใช้ได้
ชั้นเรียน
ชื่อ | รายละเอียดแบบย่อ |
MailApp | ส่งอีเมล |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eThe Mail service enables scripts to send emails on behalf of a user without accessing their Gmail account, focusing solely on sending functionality.\u003c/p\u003e\n"],["\u003cp\u003eIt features the \u003ccode\u003eMailApp\u003c/code\u003e class with methods to send emails and check the remaining daily email quota.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMailApp\u003c/code\u003e offers various \u003ccode\u003esendEmail\u003c/code\u003e methods to send emails with different levels of customization, including specifying recipients, subject, body, and optional arguments.\u003c/p\u003e\n"]]],["The Mail service enables scripts to send emails. It differs from Gmail Service by only sending emails, lacking access to Gmail accounts. The `MailApp` class facilitates this with methods like `sendEmail()` to dispatch messages, accepting variations in arguments for recipients, subject, body, and options. `getRemainingDailyQuota()` method returns the number of remaining recipients allowed for the day. The service focuses solely on outbound email functionality.\n"],null,["# Mail Service\n\nMail\n\nThis service allows scripts to send email on a user's behalf. See also\n[Gmail Service](/apps-script/reference/gmail). Unlike Gmail Service,\nMail Service's sole purpose is sending email; it cannot access a user's Gmail\naccount.\n\nClasses\n-------\n\n| Name | Brief description |\n|-------------------------------------------------|-------------------|\n| [MailApp](/apps-script/reference/mail/mail-app) | Sends email. |\n\n[MailApp](/apps-script/reference/mail/mail-app)\n-----------------------------------------------\n\n### Methods\n\n| Method | Return type | Brief description |\n|-----------------------------------------------------------------------------------------------------------------------------|-------------|----------------------------------------------------------------------------------|\n| [getRemainingDailyQuota()](/apps-script/reference/mail/mail-app#getRemainingDailyQuota()) | `Integer` | Returns the number of recipients you can send emails to for the rest of the day. |\n| [sendEmail(message)](/apps-script/reference/mail/mail-app#sendEmail(Object)) | `void` | Sends an email message. |\n| [sendEmail(recipient, subject, body)](/apps-script/reference/mail/mail-app#sendEmail(String,String,String)) | `void` | Sends an email message. |\n| [sendEmail(recipient, subject, body, options)](/apps-script/reference/mail/mail-app#sendEmail(String,String,String,Object)) | `void` | Sends an email message with optional arguments. |\n| [sendEmail(to, replyTo, subject, body)](/apps-script/reference/mail/mail-app#sendEmail(String,String,String,String)) | `void` | Sends an email message. |"]]