Re: [android-developers] sending email automatically
Look at SMTP.
On Sat, Oct 8, 2011 at 7:11 PM, Palike <Palo_sp@centrum.sk> wrote:
> Hi, at first sorry for my English. I need to make app that will
> automatically send a file from the SD card. I thought that I will do
> it through email. I write the code to send email
>
> import android.app.Activity;
> import android.content.Intent;
> import android.net.Uri;
> import android.os.Bundle;
> import android.view.View;
>
> public class EmailActivity extends Activity {
>
> /** Called when the activity is first created. */
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
> }
>
> public void poslat(View button) {
>
> Intent i = new Intent(android.content.Intent.ACTION_SEND);
> String Email[] = { "aa@aa.aa" };
> i.putExtra(android.content.Intent.EXTRA_EMAIL, Email);
> i.putExtra(android.content.Intent.EXTRA_SUBJECT, "Tu bude datum");
> i.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/lala/
> lala.txt"));
> i.setType("plain/text");
> startActivity(i);
> }
> }
>
> works well, but I feel that it cannot be configured to be sending
> automatically. How can I start? or do you have any idea how to
> automatically send a file from the SD card? eg. via FTP or something
> else? .. Thank you very much
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
--
Michael Banzon
http://michaelbanzon.com/
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home