2010-11-18 57 views
6

我無法通過Google App Engine的應用程序發送電子郵件。我遇到了幾個新手障礙,我將非常感謝您的幫助。InvalidSenderError:未經授權的發件人(Google App Engine)

我把這個功能從the tutorial和「發件人」字段,我把我的Gmail帳戶,我用來創建應用程序:

mail.send_mail(sender="[email protected]", 
         to="[email protected]", 
         subject="test email from app", 
         body="hello") 

當我嘗試,我得到的錯誤:

InvalidSenderError: Unauthorized sender 

但電子郵件

sender="[email protected]", 

是我用來登錄到應用程序的電子郵件;這是我用來創建應用程序的電子郵件。

的教程說:

The email address of the sender, the From address. The sender address must be one of the following types: The address of a registered administrator for the application. You can add administrators to an application using the Administration Console.

所以我用來創建應用程序的電子郵件應該作爲發件人工作。我究竟做錯了什麼?謝謝。

(我問在GAE組same question,但沒有迴應)

+0

[Google Appengine發送電子郵件:\ [Error \]未授權發件人]的可能副本(http://stackoverflow.com/questions/11621019/google-appengine-sending-emails-error-unauthorized-sender) – LtWorf 2013-12-27 07:21:39

回答

7

我讀到它們的基礎地址,所以也許這就是問題所在,通過谷歌應用程序別名和暱稱將無法識別。 我剛剛在幾天前處理過這個問題,並確保所有發件人地址都列在應用程序控制臺的「權限」部分中,它一切正常。

+2

發件人我用來發送電子郵件的地址與「權限」部分中列出的電子郵件完全相同。我現在只需加倍檢查。什麼是Google應用程序的別名和暱稱?我正在使用完全從儀表板中的權限複製的電子郵件。謝謝。 – Zeynel 2010-11-18 18:17:45

相關問題