volvomann Active Member Licensed User Longtime User May 5, 2012 #1 How can i create a code there I click on a mailadress in a label, and the mailclient shows up, and she mail adress standing in the adressfield?
How can i create a code there I click on a mailadress in a label, and the mailclient shows up, and she mail adress standing in the adressfield?
NJDude Expert Licensed User Longtime User May 5, 2012 #2 Assuming you have a label named "Label1" you do this: B4X: Sub Label1_Click Dim i As Intent i.Initialize(i.ACTION_VIEW, "mailto:" & Label1.Text) StartActivity(i) End Sub Upvote 0
Assuming you have a label named "Label1" you do this: B4X: Sub Label1_Click Dim i As Intent i.Initialize(i.ACTION_VIEW, "mailto:" & Label1.Text) StartActivity(i) End Sub
volvomann Active Member Licensed User Longtime User May 5, 2012 #3 NJDude said: Assuming you have a label named "Label1" you do this: B4X: Sub Label1_Click Dim i As Intent i.Initialize(i.ACTION_VIEW, "mailto:" & Label1.Text) StartActivity(i) End Sub Click to expand... Thank you Upvote 0
NJDude said: Assuming you have a label named "Label1" you do this: B4X: Sub Label1_Click Dim i As Intent i.Initialize(i.ACTION_VIEW, "mailto:" & Label1.Text) StartActivity(i) End Sub Click to expand... Thank you
volvomann Active Member Licensed User Longtime User May 6, 2012 #4 NJDude said: Assuming you have a label named "Label1" you do this: B4X: Sub Label1_Click Dim i As Intent i.Initialize(i.ACTION_VIEW, "mailto:" & Label1.Text) StartActivity(i) End Sub Click to expand... Is it posible to ad the mail subject to the code too? Upvote 0
NJDude said: Assuming you have a label named "Label1" you do this: B4X: Sub Label1_Click Dim i As Intent i.Initialize(i.ACTION_VIEW, "mailto:" & Label1.Text) StartActivity(i) End Sub Click to expand... Is it posible to ad the mail subject to the code too?
NJDude Expert Licensed User Longtime User May 6, 2012 #5 Like this: B4X: i.Initialize(i.ACTION_VIEW, "mailto:" & Label1.Text & "?subject=My subject here") Upvote 0