How to detect failover mail in Google App Engine?

once because of incorrect user input, mail bounced and did not reach the recipient. (sent from the Google engine.)

How to detect such an email?

edit: maybe I was not clear in my question:

I want to know to which mail I sent the letter that was returned (so that I can warn the user or delete the email id). this has more to do with how email rollback works. as a rule, scanned mail does not arrive exactly the same as sent, but with different information, is there any specific header or something there to find out exactly which email address was? ... I think that I have a consideration when writing these questions, I keep this question so that it can help someone.

I will just send a message from base 64encodedrecipientemailaddress@myapp.appspot.com and create a mail recipient handler. :)

so one more question: what is the maximum length the engine application (or any mail server) does for an email address?

+3
source share
4 answers

The easiest way is to encode the email address using base64 or simiar encoding and prefix it from the address.

all addresses from something@myapp.appspotmail.com are a valid email address for from gae.

just create a mail handler. decode the string from the string and get the email address to which you send the email from the beginning.

the sad thing is the maximum permissible length of 64 characters for the local part. in this case, storing the email address in the data warehouse and using its key as a local part for sending by email may be an option.

0
source

Google HTTP-. app.yaml:

inbound_services:
- mail_bounce

/_ah/bounce , . , . . , .

+3
+2

Use one of your application addresses as the from address ( anything@yourapp.appspotmail.com ) and register a handler for that address. Then you can intercept and interpret any answers (automatic or others).

+1
source

Source: https://habr.com/ru/post/1752401/


All Articles