Automatically Mail send in Background in Android

前端 未结 4 727
悲&欢浪女
悲&欢浪女 2021-01-06 13:47

When I press on Send Button in log show Mail Sent But Actually mail not sent. Please help me my code below. Why Mail not sent?

GMailSender.java

4条回答
  •  盖世英雄少女心
    2021-01-06 14:32

    You need to import lib BackgroundMailLibrary

     BackgroundMail bm = new BackgroundMail(PasswordChangeActivity.this);
                                                bm.setGmailUserName(mail id);
                                                bm.setGmailPassword(Utils.decryptIt(password)); 
                                                bm.setMailTo(ownerEmail);
                                                bm.setFormSubject(subject);
                                                bm.setFormBody(body);
                                                bm.send();
    

提交回复
热议问题