MailApp
با مجموعهها، منظم بمانید
ذخیره و دستهبندی محتوا براساس اولویتهای شما.
یک ایمیل ساده بفرستید
function sendSimpleTextEmail(recipient, subject, body) {
MailApp.sendEmail(recipient, subject, body);
}
ارسال ایمیل با پیوست
function sendEmailWithAttachments() {
const fileId = '0B41tKrRQJmxeQXlsQUVkMzNxN28';
// Send an email with two attachments: a file from Google Drive (as a PDF)
// and an HTML file.
const file = DriveApp.getFileById(fileId);
const blob = Utilities.newBlob('Insert any HTML content here', 'text/html',
'my_document.html');
MailApp.sendEmail('RECIPIENT_EMAIL', 'Attachment example',
'Two files are attached.',
{
name: 'Automatic Emailer Script',
attachments: [file.getAs(MimeType.PDF), blob]
});
}
ارسال ایمیل HTML با تصاویر
function sendHtmlEmailWithInlineImage() {
const googleLogoUrl =
'http://www.google.com/intl/en_com/images/srpr/logo3w.png';
const youtubeLogoUrl =
'https://developers.google.com/youtube/images/YouTube_logo_standard_white.png';
const googleLogoBlob = UrlFetchApp
.fetch(googleLogoUrl)
.getBlob()
.setName('googleLogoBlob');
const youtubeLogoBlob = UrlFetchApp
.fetch(youtubeLogoUrl)
.getBlob()
.setName('youtubeLogoBlob');
MailApp.sendEmail({
to: 'RECIPIENT_EMAIL',
subject: 'Logos',
htmlBody: "inline Google Logo<img src='cid:googleLogo'> images! <br>" +
"inline YouTube Logo <img src='cid:youtubeLogo'>",
inlineImages:
{
googleLogo: googleLogoBlob,
youtubeLogo: youtubeLogoBlob
}
});
}
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-09-09 بهوقت ساعت هماهنگ جهانی.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"اطلاعاتی که نیاز دارم وجود ندارد"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"بیشازحد پیچیده/ مراحل بسیار زیاد"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"قدیمی"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"مشکل ترجمه"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"مشکل کد / نمونهها"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"غیره"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"درک آسان"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"مشکلم را برطرف کرد"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"غیره"
}]
{"lastModified": "\u062a\u0627\u0631\u06cc\u062e \u0622\u062e\u0631\u06cc\u0646 \u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc 2024-09-09 \u0628\u0647\u200c\u0648\u0642\u062a \u0633\u0627\u0639\u062a \u0647\u0645\u0627\u0647\u0646\u06af \u062c\u0647\u0627\u0646\u06cc."}
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2024-09-09 بهوقت ساعت هماهنگ جهانی."]]