GAE에서 메일 보내기/받기에 대해 읽었으며 reply_to
을 사용하는 방법에 대한 질문과 답장 된 이메일 주소의 형식이 있습니다.Google App Engine (reply_to 필드)에서 메일 보내기 - 수신
내 register.py
단순히 데이터베이스에 message.sender
를 기록 :
class User(db.Model):
userEmail = db.StringProperty()
userEmailContent = db.StringProperty()
class Register(InboundMailHandler):
def receive(self, message):
newUser = User(userEmail = message.sender)
db.put(newUser)
application = webapp.WSGIApplication([
Register.mapping()
], debug=True)
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main()
가 incoming.py
에서 나는이 이메일로 신청자의 메일에 회신 오전 :
mail.send_mail(sender="<[email protected]>",
to=message.sender,
body="reply to this email to register"
reply_to=/_ah/mail/[email protected])
내가 상상하고 신청자가이 이메일에 답장을 때 register.py
은 이메일을 처리하고 신청자의 이메일 주소를 데이터베이스에 기록합니다. dev 서버에서 이것을 테스트하는 방법을 잘 모르겠습니다. 앱을 배포하기 전에 reply_to
에 할당 할 올바른 이메일 주소에 대한 조언을 원했으며 이것이 올바른 처리 방법인지 확인하고 싶습니다. 감사.