Skip to content Skip to sidebar Skip to footer

Sending Email From Gmail Directly In Android From My App Without Opening The Gmail Compose Activity

I am developing an android app where in an activity, I want to sent email. Now the scenarios are: 1. The activity will send email only via the default gmail account of the andro

Solution 1:

follow the link that krishna suggested put your subject and body as a textview (not edittext)

and use in these lines:

GMailSender sender = new GMailSender("username@gmail.com", "password");
                sender.sendMail("My Subject That cannot be changed",   
                        "My Body That cannot be changed",   
                        "user@gmail.com",   
                        "user@yahoo.com");  

and follow all the steps suggested in this link: Sending Email in Android using JavaMail API without using the default/built-in app

Post a Comment for "Sending Email From Gmail Directly In Android From My App Without Opening The Gmail Compose Activity"