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.
Linee guida per la posta inviata in blocco
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Devi seguire queste linee guida se la tua applicazione invia email collettive, ovvero messaggi simili a numerosi destinatari. Queste linee guida ti aiuteranno a migliorare il tasso di recapito nella posta in arrivo per gli utenti di Gmail, garantendo che tutti i destinatari della tua mailing list vogliano effettivamente ricevere l'email. Se i destinatari contrassegnano manualmente le tue email come spam, questo rappresenta un segnale molto forte per Gmail, che contrassegnerà come spam le tue email future.
Per ulteriori informazioni sull'invio di email, consulta la Panoramica dell'API Mail.
Autenticazione e identificazione
- Utilizza lo stesso mittente per ogni email collettiva. Quando chiami la funzione dell'API Mail per inviare email, l'intestazione
From
verrà impostata in base al mittente specificato.
- L'indirizzo del mittente deve essere un account in un dominio Google Workspace. Se il dominio è ancora in fase di prova gratuita o ha meno di sei utenti, gli Account Google che inviano troppe email contrassegnate come spam potrebbero essere temporaneamente disattivati. In questi casi, l'API Mail genera un'eccezione con un messaggio di errore
Unauthorized sender
.
- Firma le tue email con DKIM, che richiede un dominio G Suite se invii email utilizzando App Engine.
- Pubblica un record SPF per impedire agli spammer di eseguire lo spoofing dell'indirizzo del mittente della busta. SPF verifica che l'email venga inviata da un indirizzo IP pubblicato nei record DNS del mittente dell'involucro. Il mittente dell'involucro di App Engine si trova nel dominio
apphosting.bounces.google.com
, pertanto il tuo record SPF potrebbe non essere utilizzato per determinare se le email di App Engine devono essere recapitate.
Abbonamento
Ogni utente della mailing list deve attivare la ricezione dei tuoi messaggi in uno dei seguenti modi:
- Inviandoti un'email con la richiesta di iscrizione
- Selezionando manualmente una casella in un modulo web o in un software
L'utilizzo di un elenco di indirizzi email acquistato da terze parti non è considerato un'attivazione. Inoltre, non devi impostare una casella di controllo su un modulo web o in un software per iscrivere automaticamente tutti gli utenti. Gli utenti non devono essere invitati a disattivare esplicitamente le mailing.
Devi verificare che la persona che si è registrata selezionando la casella sul modulo web o nel software riceva effettivamente le email all'indirizzo specificato nel modulo. Verifica l'utente inviando un'email che richiede di confermare la ricezione.
Annullamento dell'iscrizione
- Un utente deve essere in grado di annullare l'iscrizione in uno dei seguenti modi:
- Tramite un link in evidenza nell'email senza ulteriore interazione da parte dell'utente
diversa dalla conferma.
- Tramite una risposta all'email di annullamento dell'iscrizione.
- App Engine può ricevere solo le email inviate al dominio
[APP_ID].appspotmail.com
. Pertanto, dovrai impostare il mittente su un indirizzo in questo dominio se vuoi gestire automaticamente le risposte all'annullamento dell'iscrizione alle email in App Engine.
- Utilizza l'intestazione
List-Unsubscribe
, supportata dall'API Mail di App Engine.
- Annulla automaticamente l'iscrizione degli utenti i cui indirizzi respingono più email. Puoi configurare la tua app in modo da ricevere notifiche di rimbalzo.
- Invia periodicamente conferme via email agli utenti, offrendo loro l'opportunità di cancellarsi da ogni elenco a cui sono iscritti.
- Indica in modo esplicito l'indirizzo email iscritto all'interno dell'email, perché
gli utenti potrebbero inoltrare le email da altri account.
- Formattazione secondo gli standard SMTP RFC 2822
e, se utilizzi HTML, secondo gli standard w3.org.
- I tentativi di nascondere il vero mittente del messaggio o la pagina di destinazione effettiva di eventuali link web nel messaggio potrebbero comportare la mancata consegna. Ad esempio, ti consigliamo di non utilizzare servizi di abbreviazione URL nelle email collettive, perché possono mascherare gli URL reali contenuti nel corpo dell'email.
- L'oggetto di ogni messaggio deve essere pertinente ai contenuti del corpo e non deve essere fuorviante.
Consegna a domicilio
- I seguenti fattori contribuiscono ad assicurare che i messaggi arrivino nella Posta in arrivo degli utenti di Gmail:
- L'indirizzo
From
è elencato nell'elenco Contatti dell'utente.
- Un utente fa clic su "Non è spam" per avvisare Gmail che i messaggi inviati da quell'indirizzo sono richiesti.
- Se invii email promozionali ed email transazionali relative alla tua organizzazione, ti consigliamo di separare il più possibile le email in base allo scopo.
A tal fine, puoi:
- Utilizzare indirizzi email distinti per ogni funzione.
- Invio di email da domini diversi per ogni funzione.
Mittenti di terze parti
- Se altri utenti utilizzano il tuo servizio per inviare email, sei responsabile del monitoraggio del comportamento dei tuoi utenti e/o clienti. Devi rimuovere tempestivamente tutti gli utenti e/o i clienti che utilizzano il tuo servizio per inviare email di spam. Le Norme di utilizzo accettabile della piattaforma Google Cloud vietano espressamente lo spam.
La tua applicazione può essere sospesa se violi queste norme, come descritto nei Termini di servizio della piattaforma Google Cloud.
- Devi mettere a disposizione degli utenti e/o clienti un indirizzo email per segnalare abusi, che in genere dovrebbe essere
abuse@[YOUR_DOMAIN].com
. Dovresti anche monitorare postmaster@[YOUR_DOMAIN].com
.
- Monitora le email inviate agli amministratori dell'app. Google potrebbe dover contattare urgentemente gli amministratori dell'app, ad esempio per informarti di una violazione delle Norme di utilizzo accettabile.
Possiamo aiutarti a risolvere i problemi più rapidamente se rispondi tempestivamente alle nostre email.
- Devi mantenere aggiornati i dati di contatto nel tuo record WHOIS gestito dal tuo registrar di dominio e su abuse.net.
Programmi di affiliate marketing
- I programmi di affiliate marketing ricompensano le terze parti che portano visitatori al
tuo sito. Questi programmi sono interessanti per gli spammer e possono potenzialmente fare più male che bene. Tieni presente quanto segue:
- Se il tuo brand viene associato a spam di affiliate marketing, le email inviate da te e dalle tue società consociate ne possono risentire.
- È tua responsabilità monitorare i tuoi affiliati e rimuoverli se inviano spam.
Alternative all'API Mail di App Engine
- Puoi utilizzare un fornitore di servizi di invio email di terze parti per inviare email da App Engine. Questi servizi potrebbero fornire funzionalità aggiuntive non disponibili nell'API Mail e potrebbero essere una soluzione migliore per alcuni mittenti di email collettive.
- Puoi utilizzare l'API Sockets per connetterti direttamente a un
server SMTP per inviare email.
Limiti per la posta collettiva
Se invii troppe email in un breve lasso di tempo, alcune email potrebbero essere eliminate silenziosamente a causa dei limiti di sicurezza di Google. Per evitare questo problema, calcola la frequenza giornaliera massima di email inviate al secondo dividendo la quota giornaliera per 86.400, ovvero il numero di secondi in un giorno. Non inviare email collettive a una frequenza superiore a 50 volte la frequenza giornaliera massima.
Per ulteriori informazioni su altre quote relative all'invio di email, consulta
Quote e limiti.
Passaggi successivi
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-01 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-01 UTC."],[[["\u003cp\u003eThese guidelines are essential for improving email delivery rates to Gmail users when sending bulk emails, by ensuring recipients actually want to receive the messages.\u003c/p\u003e\n"],["\u003cp\u003eUsing a consistent sender from a Google Workspace domain, signing emails with DKIM, and publishing an SPF record are crucial for authentication and preventing email spoofing.\u003c/p\u003e\n"],["\u003cp\u003eImplementing a clear opt-in process and providing easy unsubscribe options through links, email responses, or the \u003ccode\u003eList-Unsubscribe\u003c/code\u003e header are mandatory for user management and compliance.\u003c/p\u003e\n"],["\u003cp\u003eFollowing RFC 2822 SMTP and w3.org standards for email formatting, avoiding URL shorteners, and ensuring relevant subjects are key to maintaining delivery and avoiding spam filters.\u003c/p\u003e\n"],["\u003cp\u003eIf using affiliate marketing or allowing others to use your service to send email, it's your responsibility to monitor and remove users sending spam to avoid policy violations and maintain a positive sending reputation.\u003c/p\u003e\n"]]],[],null,["# Bulk Mail Guidelines\n\nYou must follow these guidelines if your application is sending\nout bulk email, that is, similar messages to numerous recipients. These\nguidelines will help to improve your inbox delivery rate to Gmail users, by\nensuring that all recipients in your distribution list actually want to receive\nthe email. If recipients manually mark your email as spam, then that acts as a\nstrong signal to Gmail to mark future emails from you as spam.\n\nFor more information on sending mail, see the\n[Mail API Overview](/appengine/docs/legacy/standard/java/mail).\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\nAuthentication and identification\n---------------------------------\n\n- Use the same sender for every bulk email. When calling the Mail API function to send email, the `From` header will be set to match the sender you specify.\n- Your sender address should be an account in a [Google Workspace](https://workspace.google.com/) domain. If the domain is still in the free trial period or has less than six users, Google accounts that send too many emails marked as spam might be temporarily disabled. In these cases, the Mail API will throw an exception with an `Unauthorized sender` error message.\n- Sign your email with [DKIM](https://support.google.com/a/answer/174124), which requires a G Suite domain if you are sending using App Engine.\n- Publish an [SPF record](http://support.google.com/a/bin/answer.py?answer=33786) to prevent spammers from spoofing your envelope sender address. SPF verifies that email is sent from an IP address that is published in the DNS records of the envelope sender. App Engine's envelope sender is in the `apphosting.bounces.google.com` domain, so your SPF record may not be used to determine if email from App Engine should be delivered.\n\nSubscription\n------------\n\n- Each user in your distribution list should opt-in to receive messages from you\n in one of the following ways:\n\n - By sending you an email asking to subscribe\n - By manually checking a box on a web form or within a piece of software\n- Using an email address list purchased from a third party is not considered\n opt-in. You also should not set a checkbox on a web form or within a piece of\n software to subscribe all users by default. Users should not be required to\n explicitly opt out of mailings.\n\n- You should verify that the person that signed up by checking the box on the\n web form or in software is actually receiving emails at the address that was\n specified in the form. Verify the user by sending an email that requires them\n to confirm receipt.\n\nUnsubscribing\n-------------\n\n- A user must be able to unsubscribe in one of the following ways:\n - Through a prominent link in the email with no further user interaction other than confirmation.\n - Via an email unsubscribe response.\n- App Engine can only receive email sent to the `[APP_ID].appspotmail.com` domain. Therefore, you will need to set your sender to an address in this domain if you want to automatically handle email unsubscribe responses within App Engine.\n- Use the `List-Unsubscribe` header, which is [supported by the App Engine Mail\n API](#Sending_mail_with_headers).\n- Automatically unsubscribe users whose addresses bounce multiple pieces of email. You can [configure your app to\n receive bounce notifications](#Receiving_bounce_notification).\n- Periodically send email confirmations to users, offering the opportunity to unsubscribe from each list they are signed up for.\n- Explicitly indicate the email address subscribed within your email, because users might forward email from other accounts.\n\nFormat\n------\n\n- Format to [RFC 2822 SMTP standards](http://www.ietf.org/rfc/rfc2822.txt) and, if using HTML, [w3.org standards](http://www.w3.org/standards/techs/html).\n- Attempts to hide the true sender of the message or the true landing page for any web links in the message may result in non-delivery. For example, we recommend that you do not use URL shortener services in bulk email, because these can mask the real URLs contained in the body of your email.\n- The subject of each message should be relevant to the body's content and should not be misleading.\n\nDelivery\n--------\n\n- The following factors will help messages arrive in Gmail users' inboxes:\n - The `From` address is listed in the user's Contacts list.\n - A user clicks \"Not Spam\" to alert Gmail that messages sent from that address are solicited.\n- If you send both promotional email and transactional email relating to your organization, we recommend separating email by purpose as much as possible. You can do this by:\n - Using separate email addresses for each function.\n - Sending email from different domains for each function.\n\nThird-party senders\n-------------------\n\n- If others use your service to send email, you are responsible for monitoring your users and/or clients' behavior. You must remove, in a timely fashion, all users and/or clients who use your service to send spam email. The [Google\n Cloud Platform Acceptable Use Policy](/terms/aup) specifically prohibits spam. Your application can be suspended if you violate this policy, as described in the [Google Cloud Platform Terms of Service](/terms).\n- You must have an email address available for users and/or clients to report abuse, which should normally be `abuse@[YOUR_DOMAIN].com`. You should also monitor `postmaster@[YOUR_DOMAIN].com`.\n- Monitor email sent to app admins. Google may need to urgently contact app admins, for example to notify you of a violation of the Acceptable Use Policy. We can help you to resolve the problems more quickly if you respond promptly to our emails.\n- You must maintain up-to-date contact information in your WHOIS record maintained by your domain registrar, and on [abuse.net](http://abuse.net/).\n\nAffiliate marketing programs\n----------------------------\n\n- Affiliate marketing programs reward third-parties for bringing visitors to your site. These programs are attractive to spammers and can potentially do more harm than good. Please note the following:\n - If your brand becomes associated with affiliate marketing spam, it can affect the email sent by you and your other affiliates.\n - It is your responsibility to monitor your affiliates and remove them if they send spam.\n\nAlternatives to the App Engine Mail API\n---------------------------------------\n\n- You can use a third-party email delivery service provider to send email from App Engine. These services may provide additional features that are not available in the Mail API and may be a better solution for some bulk email senders.\n- You can use the [Sockets API](../sockets) to connect directly to an SMTP server to send email.\n\nLimits for bulk mail\n--------------------\n\nIf you send too many emails in a short burst, some emails might be silently\ndropped due to Google safety limits. To avoid this, calculate the maximum daily\nrate of emails sent per second by dividing your daily quota by 86,400, the\nnumber of seconds in a day. Do not send bulk email at a rate higher than 50\ntimes the maximum daily rate.\n\nFor more information on other quotas around sending mail, see\n[Quotas and limits](/appengine/docs/legacy/standard/java/mail#quotas_and_limits).\n\nWhat's next\n-----------\n\n- Read the [Mail API\n Overview](/appengine/docs/legacy/standard/java/mail).\n- Learn how to [send\n mail with the Mail API](/appengine/docs/legacy/standard/java/mail/sending-mail-with-mail-api)."]]