Question

I am trying to setup email forwarding from my-domain.com to myappid.appspot.com. When I sign in to the email account and enter the email for forwarding messages, it says that a confirmation message with a code had been sent there. How can I access that code?

Was it helpful?

Solution

I created this and made it forward a confirmation message to my email. From there I got the link, clicked it and it worked just perfectly!

class LogSenderHandler(InboundMailHandler):
    def receive(self, mail_message):
        logging.info("Received a message from: " + mail_message.sender)
        sender_address = "sender@email.com"
        subject = "Processing message"
        user_address = 'my@email.com
        body = mail_message.original
        mail.send_mail(sender_address, user_address, subject, body)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top