Email is Blank??

bishmedia

Member
Licensed User
Longtime User
I'm plodding my way through the tutorials and im trying to do an email like the following....

B4X:
Sub btnSendEmail_Click
         Message.To.Add("[email protected]")
         StartActivity(Message.GetIntent)
         Message.Subject = "Subject Variable here"
         Message.Body = "Body variable here"   
End Sub

The email client opens up but the subject and body are blank??

Anyone?
 

masterleous

Member
Licensed User
Longtime User
You had forgotten one decleration

B4X:
Dim Message As Email

try this

B4X:
Sub btnSendEmail_Click
            Dim Message As Email
            Message.To.Add("[email protected]")
            StartActivity(Message.GetIntent)
            Message.Subject = "Subject Variable here"
            Message.Body = "Body variable here"    
End Sub
 
Upvote 0

bishmedia

Member
Licensed User
Longtime User
Thanks but i just sussed it, declaration was there but the following line should have been at the end!!!

StartActivity(Message.GetIntent)

Many Thanks :)
 
Upvote 0
Top