J junaidahmed Well-Known Member Licensed User Longtime User Apr 22, 2011 #1 How to send & Receive email by programatically.
K kickaha Well-Known Member Licensed User Longtime User Apr 22, 2011 #2 Here is a routine from one of my programs Code: Copy 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 Hope that gives you a start on it. Upvote 0
Here is a routine from one of my programs Code: Copy 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 Hope that gives you a start on it.
J junaidahmed Well-Known Member Licensed User Longtime User Apr 22, 2011 #3 this is for sending message,what about receive message? Upvote 0
NJDude Expert Licensed User Longtime User Apr 22, 2011 #4 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? Last edited: Apr 26, 2011 Upvote 0
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?
M ManuelFG Member Licensed User Longtime User Jan 10, 2012 #5 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: kickaha said: Here is a routine from one of my programs Code: Copy 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 Hope that gives you a start on it. Click to expand... Upvote 0
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: kickaha said: Here is a routine from one of my programs Code: Copy 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 Hope that gives you a start on it. Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Jan 10, 2012 #6 You can use SMTP from the Net library. Though you will need the username and password. Upvote 0
S Smee Well-Known Member Licensed User Longtime User Jan 10, 2012 #7 @ kickaha I use the following Code: Copy 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? Thanks Joe Upvote 0
@ kickaha I use the following Code: Copy 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? Thanks Joe
I Itsoftware New Member Apr 19, 2013 #8 Hi! I'm tryin to send an email notification, but here! ??? What should get in the activity named: "Message.Getintent" ? thanks in advance. Upvote 0
Hi! I'm tryin to send an email notification, but here! ??? What should get in the activity named: "Message.Getintent" ? thanks in advance.
Erel B4X founder Staff member Licensed User Longtime User Apr 21, 2013 #9 For some reason you appear as an unlicensed user in the forum. Please contact [email protected] in order to fix it. Upvote 0
For some reason you appear as an unlicensed user in the forum. Please contact [email protected] in order to fix it.