Sending Emails from droidscript

258 views
Skip to first unread message

HJCD studios

unread,
Apr 12, 2021, 10:05:50 AM4/12/21
to DroidScript
Hello everyone i need some help im creating an email spk
And the app.CreateEmail(); object does not work i have the right password what could be worng?

Alan Hendry

unread,
Apr 12, 2021, 12:08:38 PM4/12/21
to DroidScript
Hi,
I presume you started by copying the example in the app reference.
In an old post some-one said
"app.CreateEmail requires you to pass your email and password, which is required to verify you but it also creates a security issue because the password in included as plain text in the apk"
You could ask the user to type in their email and password (but would they trust your app?).
I reckon the account in the createemail and the sender in the send should be the same (or mimecast etc will reject it).
Are you getting any error messages? 
(Try touching the fourth "bug" icon at the bottom of the edit screen, or the right hand debug window if using the IDE from a browser). 
Regards, ah

Steve Garman

unread,
Apr 13, 2021, 2:17:34 AM4/13/21
to DroidScript
Since CreateEmail was added to DroidScript, email security has become a lot tighter and most email providers do not, by default, allow you to send email using that mechanism

There is advice on allowing these messages via your Gmail account at https://support.google.com/accounts/answer/6010255
but we do not recommend making those changes to your normal Gmail account.

Some people have created a special Gmail account with very permissive security settings just for use by their DroidScript app

If you put the above url into the search bar of this group you will probably find more discussion of this

Alan Hendry

unread,
Apr 14, 2021, 7:16:01 AM4/14/21
to DroidScript
Hi,
Depending on what your app is trying to do, there's also
SendFile and SendImage (asks the user what they want to send it to - email, nearby share, Google Drive, etc - then opens the appropriate app).
app.SendMail (opens up the users email app, they can see to/subject/attachments and choose to send it or not )
Not sure if there is confusion in the docs between (app.SendMail) vs (eml=app.CreateEmail with eml.Send) 
Regards, ah

On Monday, 12 April 2021 at 15:05:50 UTC+1 jonasvil...@gmail.com wrote:

Jo Elegolo

unread,
Apr 14, 2021, 11:42:29 AM4/14/21
to DroidScript
Hi,
I am using a gmail-account for sending emails from my DS app, but
  • at first I had to configure 2-way authentication for the account
  • then I could create a special password for the app/device I wanted to send the email from. This password is given by Google and you have to copy it into your app's code
Open your gmail-account and look for that procedure.

Regards,
Jo
Reply all
Reply to author
Forward
0 new messages