Stay organized with collections Save and categorize content based on your preferences.
When you send mail using the Mail API, there are some restrictions on the headers that you can use and the types of files you can attach.
This API is supported for first-generation runtimes and can be used when upgrading to corresponding second-generation runtimes. If you are updating to the App Engine Java 11/17 runtime, refer to the migration guide to learn about your migration options for legacy bundled services.An outgoing email has headers that provide details about the message, such as the sender, recipient, date, and subject. Each header has a name and a value. You can also include the following headers in an outgoing email; for security purposes, other headers are not allowed:
An outgoing email message can have file attachments. Each attachment has a filename and file data. The file data can come from any source, such as an application data file or the datastore.
Filename extensions that are prohibitedAs a security measure to protect against viruses, email attachments cannot use the following filename extensions, and ZIP files cannot contain files with the following filename extensions:
The MIME type of an attachment is determined from the file's extension. The MIME type identifies the type of content that is being sent, and can determine how that data is transferred.
The following is a list of MIME types and their corresponding filename extensions. You are not limited to these extensions, but if you use an unknown extension, App Engine will assign it the MIME type application/octet-stream
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["When using the Mail API, specific headers like In-Reply-To, List-Id, and others are allowed, while other headers are restricted for security."],["Outgoing emails can include file attachments from various sources, with each attachment having a filename and file data."],["Certain filename extensions, such as .exe, .bat, and .vbs, are prohibited for email attachments and within ZIP files to prevent the spread of viruses."],["The Multipurpose Internet Mail Extensions (MIME) type, which is derived from the file extension, defines the content type of an attachment, and when an unknown extension is used it will be given the MIME type of `application/octet-stream`."],["The provided documentation explains which first-generation runtimes can use the Mail API, as well as the migration options to second-generation runtimes."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4