B b4afan New Member Licensed User Longtime User Mar 30, 2012 #1 I have seen this code sample for email out a file. What about direct email out contents from several user entered text response, hit a button and send to email. Dim Message As Email Message.To.Add("[email protected]") Message.Subject = "title text" Message.Body = "(testing)" Message.Attachments.Add(File.Combine(File.DirRootExternal, "all.txt")) StartActivity(Message.GetIntent) '
I have seen this code sample for email out a file. What about direct email out contents from several user entered text response, hit a button and send to email. Dim Message As Email Message.To.Add("[email protected]") Message.Subject = "title text" Message.Body = "(testing)" Message.Attachments.Add(File.Combine(File.DirRootExternal, "all.txt")) StartActivity(Message.GetIntent) '
Erel B4X founder Staff member Licensed User Longtime User Mar 30, 2012 #2 You can access the user input with EditText.Text property. For example: Code: Copy Dim Message As Email Message.To.Add(EditText1.Text) Message.Subject = EditText2.Text Message.Body = "(testing)" Message.Attachments.Add(File.Combine(File.DirRootE xternal, "all.txt")) StartActivity(Message.GetIntent) ' Upvote 0
You can access the user input with EditText.Text property. For example: Code: Copy Dim Message As Email Message.To.Add(EditText1.Text) Message.Subject = EditText2.Text Message.Body = "(testing)" Message.Attachments.Add(File.Combine(File.DirRootE xternal, "all.txt")) StartActivity(Message.GetIntent) '
S sarkis Member Licensed User Longtime User Mar 30, 2012 #3 Question about sending email Please let me know. Is it possible that the Email have been sent on background ,without activating new screen? Thanks Upvote 0
Question about sending email Please let me know. Is it possible that the Email have been sent on background ,without activating new screen? Thanks
Erel B4X founder Staff member Licensed User Longtime User Apr 1, 2012 #4 Yes, with SMTP: Basic4android Search: SMTP Upvote 0
P Penko Active Member Licensed User Longtime User Apr 3, 2012 #5 This seems to activate Gmail by default. What's the way to give the user the option to choose either Gmail, or Mail, or other installed Mail clients? Upvote 0
This seems to activate Gmail by default. What's the way to give the user the option to choose either Gmail, or Mail, or other installed Mail clients?
Erel B4X founder Staff member Licensed User Longtime User Apr 4, 2012 #6 This intent will start the default application or show the chooser dialog if there is no default application. You can force the dialog chooser to show by wrapping the intent: Code: Copy Dim i As Intent i = Message.GetIntent i = i.WrapAsIntentChooser("Choose mail client") StartActivity(i) Upvote 0
This intent will start the default application or show the chooser dialog if there is no default application. You can force the dialog chooser to show by wrapping the intent: Code: Copy Dim i As Intent i = Message.GetIntent i = i.WrapAsIntentChooser("Choose mail client") StartActivity(i)
P Penko Active Member Licensed User Longtime User Apr 4, 2012 #7 Thanks, will try it. Sent from my HTC Desire using Tapatalk Upvote 0
P Penko Active Member Licensed User Longtime User Apr 5, 2012 #8 B4A compiler returns: Error description: Cannot assign void value. Occurred on line: 1631 i = i.WrapAsIntentChooser("Choose mail client") Word: ) Click to expand... Upvote 0
B4A compiler returns: Error description: Cannot assign void value. Occurred on line: 1631 i = i.WrapAsIntentChooser("Choose mail client") Word: ) Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Apr 6, 2012 #9 It should be: Code: Copy i.WrapAsIntentChooser("...") Upvote 0
P Penko Active Member Licensed User Longtime User Apr 7, 2012 #10 Sorry, I correct that and it gave the compiler error at that moment. Now it compiles fine but still uses Gmail. Is it possible that it's related to my phone? I do have the Mail client installed and I use it intensively. Upvote 0
Sorry, I correct that and it gave the compiler error at that moment. Now it compiles fine but still uses Gmail. Is it possible that it's related to my phone? I do have the Mail client installed and I use it intensively.
Erel B4X founder Staff member Licensed User Longtime User Apr 7, 2012 #11 Maybe your email client doesn't recognize this intent. Upvote 0