Java 8 ha raggiunto la fine del supporto
e verrà
ritirato
il 31 gennaio 2026. Dopo il ritiro, non potrai eseguire il deployment di applicazioni Java 8, anche se la tua organizzazione ha utilizzato in precedenza un criterio dell'organizzazione per riattivare i deployment di runtime legacy. Le tue applicazioni Java 8 esistenti continueranno a essere eseguite e a ricevere traffico dopo la
data di ritiro. Ti consigliamo di
eseguire la migrazione all'ultima versione supportata di Java.
Posta con intestazioni o allegati
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Quando invii email utilizzando l'API Mail, esistono alcune limitazioni per quanto riguarda le intestazioni che puoi utilizzare e i tipi di file che puoi allegare.
Un'email in uscita contiene intestazioni che forniscono dettagli sul messaggio, ad esempio il mittente, il destinatario, la data e l'oggetto. Ogni intestazione ha un nome e un valore.
Puoi anche includere le seguenti intestazioni in un'email in uscita. Per motivi di sicurezza, non sono consentite altre intestazioni:
- In-Reply-To
- List-Id
- List-Unsubscribe
- Per conto di
- Riferimenti
- Resent-Date
- Resent-From
- Resent-To
Posta con allegati
Un messaggio email in uscita può avere allegati di file. Ogni allegato ha un nome file e dati del file. I dati del file possono provenire da qualsiasi origine, ad esempio un
file di dati dell'applicazione o il datastore.
Estensioni di nomi file vietate
Come misura di sicurezza per proteggerti dai virus, gli allegati email non possono utilizzare
le seguenti estensioni dei nomi file e i file ZIP non possono contenere file con le
seguenti estensioni dei nomi file:
- ade
- adp
- pipistrello
- chm
- cmd
- com
- cpl
- exe
- hta
- ins
- isp
- jse
- lib
- mde
- msc
- msp
- mst
- pif
- scr
- sct
- shb
- sys
- vb
- vbe
- vbs
- vxd
- wsc
- wsf
- wsh
Allegati e tipi MIME (Multipurpose Internet Mail Extensions)
Il tipo MIME di un allegato viene determinato dall'estensione del file. Il tipo MIME identifica il tipo di contenuti inviati e può determinare il modo in cui vengono trasferiti i dati.
Di seguito è riportato un elenco dei tipi MIME e delle relative estensioni dei nomi file. Non sei limitato a queste estensioni, ma se utilizzi un'estensione sconosciuta, App Engine le assegnerà il tipo MIME application/octet-stream
.
MIME type (Tipo MIME) |
Estensioni dei nomi file |
application/msword |
doc, docx |
application/pdf |
pdf |
application/rss+xml |
rss |
application/vnd.google-earth.kml+xml |
kml |
application/vnd.google-earth.kmz |
kmz |
application/vnd.ms-excel |
xls, xlsx |
application/vnd.ms-powerpoint |
pps, ppt, pptx |
application/vnd.oasis.opendocument.presentation |
odp |
application/vnd.oasis.opendocument.spreadsheet |
ods |
application/vnd.oasis.opendocument.text |
odt |
application/vnd.sun.xml.calc |
sxc |
application/vnd.sun.xml.writer |
sxw |
application/x-gzip |
gzip |
application/zip |
zip |
audio/basic |
au snd |
audio/flac |
flac |
audio/mid |
mid, rmi |
audio/mp4 |
m4a |
audio/mpeg |
mp3 |
audio/ogg |
oga, ogg |
audio/x-aiff |
aif, aifc, aiff |
audio/x-wav |
wav |
image/gif |
gif |
image/jpeg |
jpeg, jpg, jpe |
immagine/png |
png |
image/tiff |
tiff, tif |
image/vnd.wap.wbmp |
wbmp |
image/x-ms-bmp |
bmp |
text/calendar |
ics |
text/comma-separated-values |
csv |
text/css |
css |
text/html |
htm, html |
text/plain |
asc, c, diff, log, patch, pot, text, txt |
text/x-vcard |
vcf |
video/mp4 |
mp4 |
video/mpeg |
mpeg, mpg, mpe |
Video/ogg |
ogv |
video/quicktime |
qt, mov |
video/x-msvideo |
avi |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-09-04 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eWhen using the Mail API, specific headers like In-Reply-To, List-Id, and others are allowed, while other headers are restricted for security.\u003c/p\u003e\n"],["\u003cp\u003eOutgoing emails can include file attachments from various sources, with each attachment having a filename and file data.\u003c/p\u003e\n"],["\u003cp\u003eCertain filename extensions, such as .exe, .bat, and .vbs, are prohibited for email attachments and within ZIP files to prevent the spread of viruses.\u003c/p\u003e\n"],["\u003cp\u003eThe 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 \u003ccode\u003eapplication/octet-stream\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe provided documentation explains which first-generation runtimes can use the Mail API, as well as the migration options to second-generation runtimes.\u003c/p\u003e\n"]]],[],null,["# Mail with Headers or Attachments\n\nWhen you send mail using the [Mail API](/appengine/docs/legacy/standard/java/mail),\nthere are some restrictions on the headers that you can use and the types of\nfiles you can attach.\n| This API is supported for first-generation runtimes and can be used when [upgrading to corresponding second-generation runtimes](/appengine/docs/standard/\n| java-gen2\n|\n| /services/access). If you are updating to the App Engine Java 11/17 runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/java-differences) to learn about your migration options for legacy bundled services.\n\nOptional headers you can use\n----------------------------\n\nAn outgoing email has headers that provide details about the message, such as\nthe sender, recipient, date, and subject. Each header has a name and a value.\nYou can also include the following headers in an outgoing email; for security\npurposes, other headers are not allowed:\n\n- In-Reply-To\n- List-Id\n- List-Unsubscribe\n- On-Behalf-Of\n- References\n- Resent-Date\n- Resent-From\n- Resent-To\n\nMail with attachments\n---------------------\n\nAn outgoing email message can have file attachments. Each attachment has a\nfilename and file data. The file data can come from any source, such as an\napplication data file or the datastore.\n\n### Filename extensions that are prohibited\n\nAs a security measure to protect against viruses, email attachments cannot use\nthe following filename extensions, and ZIP files cannot contain files with the\nfollowing filename extensions:\n\n- ade\n- adp\n- bat\n- chm\n- cmd\n- com\n- cpl\n- exe\n- hta\n- ins\n- isp\n- jse\n- lib\n- mde\n- msc\n- msp\n- mst\n- pif\n- scr\n- sct\n- shb\n- sys\n- vb\n- vbe\n- vbs\n- vxd\n- wsc\n- wsf\n- wsh\n\n### Attachments and Multipurpose Internet Mail Extensions (MIME) types\n\nThe MIME type of an attachment is determined from the file's extension. The MIME\ntype identifies the type of content that is being sent, and can determine how\nthat data is transferred.\n\nThe following is a list of MIME types and their corresponding filename\nextensions. You are not limited to these extensions, but if you use an unknown\nextension, App Engine will assign it the MIME type `application/octet-stream`."]]