Once email message is received, I send some reply to the user with GAE usage:
class EmailReplyHandler(webapp2.RequestHandler): # parse email details manually
def post(self):
msg = email.message_from_string(self.request.body)
from_realname, from_emailaddr = email.utils.parseaddr(msg['from'])
...
email = mail.EmailMessage()
email.to = from_emailaddr
...
email.send()
...
app = webapp2.WSGIApplication([('/_ah/mail/report@myappid\.appspotmail\.com', EmailReplyHandler),
What should I indicate in the reply that user's mail software will recognize that as reply? Should I keep the same subject and add RE:
as prefix? What else? Is there any solution to use different subject?
Actually, it depends on the email client.
You can try by parsing Message-ID
header of the inbount mail and adding it to In-Reply-To
and References
headers of the outbout (your reply) mail.
There are other headers you could use, see Sending Mail with Headers section.