Google Scripts: send email with GMail imported account

Zampone

I'm creating a script with Google Script to perform a multiple email send with personalized text inside the email body (like name and addresses). Is it possible to send the emails with an imported account (in GMail) via script?

Thanks

Huan

You can use send method of GmailApp:

https://developers.google.com/apps-script/reference/gmail/gmail-app#sendemailrecipient-subject-body

sendEmail(recipient, subject, body)

Sends an email message. The size of the email (including headers) may not exceed 20KB.

// The code below will send an email with the current date an time
 var now = new Date();
 GmailApp.sendEmail("[email protected]", "current time", "The time is: " + now.toString());

Also, GmailApp.sendEmail support send from your alias as well.

sendEmail(recipient, subject, body, options) support use options to set options.from = '[email protected]', as document saying:

from: String, the address that the email should be sent from, which must be one of the values returned by getAliases()

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Send Email via Gmail from Command Prompt

分類Dev

gmail not load external css for send email templates

分類Dev

Send an HTML email using the Gmail API

分類Dev

Unable to send to email address with "plus" character using gmail

分類Dev

Firebase: Is it possible to add a new Email/Password account when that email already is being used for a Google, Microsoft etc account?

分類Dev

Send Email to Multiple Addresses in Google Spreadsheet

分類Dev

Google Script Code to send email and hide row

分類Dev

Unable to send excel attachment by Gmail using Google Script

分類Dev

How do I tell Prometheus' Alertmanager to send email through Gmail's SMTP server

分類Dev

How Can i send the email from the MVC4 to my gmail without using my password?

分類Dev

Dynamically send blobs from azure storage account to email using azure logic apps

分類Dev

Reading Gmail Email in Python

分類Dev

Send email flask google app engine - Invalid sender format

分類Dev

Gmail Batch Send

分類Dev

How to get subject of email from gmail using google API using python?

分類Dev

Gmail PHP API Sending Email

分類Dev

Google Apps Script to send an email stating which value replaced which value in a given cell in Google Sheets

分類Dev

Send email as reply to thread

分類Dev

send email with attachment in CodeIgniter

分類Dev

Send an Email at a future date

分類Dev

Poco unable to send email

分類Dev

How To Send A Reply With Gmail API

分類Dev

Googleドライブ「[email protected]の無効なクレデンシャル」

分類Dev

Getting error while sending email through Gmail

分類Dev

gmail api: Get latest email in the thread

分類Dev

Extract phone numbers from Gmail email body

分類Dev

GMAIL API sending email with attachment in c#

分類Dev

Setting gmail as default for sending files via email

分類Dev

Gitlab can't deliver email to Gmail Accounts

Related 関連記事

  1. 1

    Send Email via Gmail from Command Prompt

  2. 2

    gmail not load external css for send email templates

  3. 3

    Send an HTML email using the Gmail API

  4. 4

    Unable to send to email address with "plus" character using gmail

  5. 5

    Firebase: Is it possible to add a new Email/Password account when that email already is being used for a Google, Microsoft etc account?

  6. 6

    Send Email to Multiple Addresses in Google Spreadsheet

  7. 7

    Google Script Code to send email and hide row

  8. 8

    Unable to send excel attachment by Gmail using Google Script

  9. 9

    How do I tell Prometheus' Alertmanager to send email through Gmail's SMTP server

  10. 10

    How Can i send the email from the MVC4 to my gmail without using my password?

  11. 11

    Dynamically send blobs from azure storage account to email using azure logic apps

  12. 12

    Reading Gmail Email in Python

  13. 13

    Send email flask google app engine - Invalid sender format

  14. 14

    Gmail Batch Send

  15. 15

    How to get subject of email from gmail using google API using python?

  16. 16

    Gmail PHP API Sending Email

  17. 17

    Google Apps Script to send an email stating which value replaced which value in a given cell in Google Sheets

  18. 18

    Send email as reply to thread

  19. 19

    send email with attachment in CodeIgniter

  20. 20

    Send an Email at a future date

  21. 21

    Poco unable to send email

  22. 22

    How To Send A Reply With Gmail API

  23. 23

    Googleドライブ「[email protected]の無効なクレデンシャル」

  24. 24

    Getting error while sending email through Gmail

  25. 25

    gmail api: Get latest email in the thread

  26. 26

    Extract phone numbers from Gmail email body

  27. 27

    GMAIL API sending email with attachment in c#

  28. 28

    Setting gmail as default for sending files via email

  29. 29

    Gitlab can't deliver email to Gmail Accounts

ホットタグ

アーカイブ