0

i have an image id i want to attach it with my email in javamail API.

Thant image is placed in drawable folder.

I didn't have image path in the form of string.

Can any one help me for this.

Jaffar Raza
  • 311
  • 1
  • 6
  • 19
  • Before negative someone points try to understand the question – Jaffar Raza Feb 15 '12 at 11:43
  • when you are sending email at that time only attache image path in database. and at the time of sending extract image with the help of stored path. its pretty simple – OnkarDhane Feb 15 '12 at 11:44
  • I want a single file to be mailed someone that is plaed in my drawable folder... As shown in http://stackoverflow.com/questions/9292075/accessing-primary-account-and-call-it-in-your-own-ui/9292203#9292203 And i tried that the file attachemt method passes a string that contains the path.. – Jaffar Raza Feb 15 '12 at 11:46

1 Answers1

0

To extract image you can refer this http://developer.android.com/guide/topics/resources/drawable-resource.html

And if you have attachment code then its fine. otherwise let me know i will give you code for it.you have to just replace path. it may help you. Also follow my ans. given to this how to getAuth token and send email in background?

Community
  • 1
  • 1
OnkarDhane
  • 1,450
  • 2
  • 14
  • 24
  • Actually i am using this example http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_(no_Intents)_in_Android In this add attachments carries string path that is mostly make through sd car or internal memory. – Jaffar Raza Feb 15 '12 at 11:56
  • But how to get image path from drawable – Jaffar Raza Feb 15 '12 at 11:57
  • 1
    ya i knows that email sending code. have you gone through above link which i have posted in ans.? you will get ans. – OnkarDhane Feb 15 '12 at 12:18