I saw an old thread which appears to be something I was looking for. I need an app to just send email to my gmail account (for user feedback). The thread suggested I start a new thread, so here it is.
The link I'm referencing is: https://www.b4x.com/android/forum/threads/background-mail.59264/#post-373428
I downloaded the files, added them to my library, ticked the BackgroundMail checkbox, then placed the example code into my project:
I'm getting an undeclared variable 'bgmail' error. I must have did something wrong or am missing something.
My second question is: How much of a security risk is it to store my email password in code? I don't see any threads related to BackgroundMail, so there must be a reason people aren't using it and I'm wondering if this is why.
Thanks in advance.
The link I'm referencing is: https://www.b4x.com/android/forum/threads/background-mail.59264/#post-373428
I downloaded the files, added them to my library, ticked the BackgroundMail checkbox, then placed the example code into my project:
B4X:
bgmail.GmailUserName = "[email protected]"
bgmail.GmailPassword = "password"
bgmail.FormSubject = "PDF Invoice"
bgmail.MailTo = txtEmail.Text.Trim
bgmail.FormBody= "Dear customer, the below attachement contains your invoice in pdf format.Please contact us for more details."
bgmail.Attachment = (File.Combine(File.DirRootExternal, FileName))
bgmail.SendingMessage= "Sending PDF Invoice To " & txtEmail.Text.Trim
bgmail.SendingMessageSuccess = "Sent Successfully"
bgmail.ProcessVisibility = True
bgmail.send
I'm getting an undeclared variable 'bgmail' error. I must have did something wrong or am missing something.
My second question is: How much of a security risk is it to store my email password in code? I don't see any threads related to BackgroundMail, so there must be a reason people aren't using it and I'm wondering if this is why.
Thanks in advance.