您好我的回答下面這個問題:你如何從Android的任何電子郵件地址發送電子郵件?
Sending Email in Android using JavaMail API without using the default/built-in app 但在方法Sendmail的不工作設置發件人。
我希望能夠發送來自不同地址的郵件,如[email protected]
,[email protected]
等......這樣當人們回覆電子郵件時,他們會轉到正確的地址。
編輯:通過不工作,我的意思是,每當我收到一封電子郵件,它始終由您登錄到使用該帳戶:
GMailSender sender = new GMailSender("[email protected]", "password");
,而不是發件人字段您填寫的Sendmail的方法:
sender.sendMail("This is Subject",
"This is Body",
"[email protected]",
"[email protected]");
嘗試[這個答案] [1]。 [1]:http://stackoverflow.com/questions/8429818/spring-3-0-simplemailmessage-support – 2011-12-16 23:08:27