Sub ButtonSaveSendMail_Click
Dim Message As Email
Dim savedir, savefile As String
savefile= EditTextSaveFilename.Text & ".csv"
savedir = File.DirRootExternal & "/AndyPad"
Message.To.Add(EditTextSaveAddress.Text) 'Email address
Message.body = EditTextSaveEmailBody.Text 'Email main text
Message.Attachments.Add(File.Combine(savedir, savefile))' attach a file to the email
StartActivity(Message.GetIntent)
End Sub
Speaking of emailing programatically, it seems Android depends on a email client installed on the device?, I'm asking this because I'd like to write a sample email client and it doesn't work, the code you posted doesn't work on my HTC EVO; I have found also another sample code which does work on mine but opens the email client <?>
Has anyone written a B4A email client by any chance?
How send automatically email without push a button
I need help about how send automatically email without push a button. This program work but it need push a button.
is it posible to do by program?
Thank
Manuel
:sign0085:
Sub ButtonSaveSendMail_Click
Dim Message As Email
Dim savedir, savefile As String
savefile= EditTextSaveFilename.Text & ".csv"
savedir = File.DirRootExternal & "/AndyPad"
Message.To.Add(EditTextSaveAddress.Text) 'Email address
Message.body = EditTextSaveEmailBody.Text 'Email main text
Message.Attachments.Add(File.Combine(savedir, savefile))' attach a file to the email
StartActivity(Message.GetIntent)
End Sub
Dim SMTP As SMTP
Dim server, emailname, password, protocol, Msg As String
Dim port As Int
.....
....
SMTP.Initialize(server, port, emailname, password, protocol)
SMTP.UseSSL=True
SMTP.To.Add(emailname)
SMTP.Subject = "test"
SMTP.Body = Msg
SMTP.Send
What is the benefit of one over the other.
Also what happens if there is no internet connection at the time of aactivaton? does the email get save until a connection becomes available?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.