Problem with eMail-Sending

CryoGenID

Active Member
Licensed User
Longtime User
Hello Community!

Once again I need your help :)

I am trying to send out an email and pre-set the recipient, Subject and Body.

The eMail-Activity opens, but everything is empty... :confused:
I am using the emulator as I currently have no "live" phone available...

This is my code-part:
B4X:
Dim eMailMessage As Email
eMailMessage.To.Add("xx@y.com")
eMailMessage.Subject = "Unknown Article!"
eMailMessage.Body = "Unknown Article " & articleCode
StartActivity(eMailMessage.GetIntent) ' Send the eMail

Thanks a lot for your help to get this working!

Best regards,

Christian
 

stevel05

Expert
Licensed User
Longtime User
Hi Christian,

After having played with email sending with and without attachments, the only thing I can tell you is that email clients seems to work inconsistently across devices.

I've tried your code on an emulator, my version of gmail on there doesn't respond to the intent, K-9 mail works as expected and fills in the data as required.

On my phone (HTC Hero), gmail and k-9 mail both work as expected.

Steve
 
Upvote 0

CryoGenID

Active Member
Licensed User
Longtime User
Steve,

thanks for your reply!
So on Android, there is no "default" email-application but one (in case of a virgin emulator) or several installed and the one set as "default" will open with the call of my program?

So is there any way I can send an email and be _sure_ that it will get sent correctly?

Thanks and best regards,

Christian
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
When you issue a start activity with the intent, any app that can handle it should respond and you should be able to choose which one you want to use.

The most consistent app I've found is K-9 mail which seems to handle everything I've asked it to consistently, although I've had the discussion on the forum before, if your app is going to be distributed your users may not want to download another app just to send your emails.

If it's for your own use then it's not so much of a problem.

Steve
 
Upvote 0

CryoGenID

Active Member
Licensed User
Longtime User
Steve,

thanks for your reply.
Well the problem is that the program will be downloaded by a lot of people here and be used on a wide range of phone :(

So I need a dependable way/method of sending an email from the device :sign0085:

There HAS to be way... somehow... I hope... :)

Thanks and best regards,

Chris
 
Upvote 0
Top