MailApp
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Basit e-posta gönderme
function sendSimpleTextEmail(recipient, subject, body) {
MailApp.sendEmail(recipient, subject, body);
}
Eki olan e-posta gönderme
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]
});
}
Resim içeren HTML e-postası gönderme
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
}
});
}
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-09-11 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"İhtiyacım olan bilgiler yok"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Çok karmaşık / çok fazla adım var"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Güncel değil"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Çeviri sorunu"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Örnek veya kod sorunu"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Diğer"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Anlaması kolay"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Sorunumu çözdü"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Diğer"
}]
{"lastModified": "Son g\u00fcncelleme tarihi: 2024-09-11 UTC."}
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2024-09-11 UTC."]]