send email with an attachment without user intervention

124 views
Skip to first unread message

Mark Allemang

unread,
Feb 28, 2025, 6:59:50 AMFeb 28
to DroidScript
Is this possible in recent android versions??   I can handle the gmail authentication but can't send an email without user intervention.

Dave

unread,
Mar 2, 2025, 10:25:26 AMMar 2
to DroidScript
It should be possible when the file exists inside your app's scoped storage.  You might need to copy it into a temp folder if it originates from outside your scoped storage or use the app.ChooseFile which will copy the file into scoped storage automatically for you.

Or you can use the 'Storage Access' sample to see how to ask the user for permissions to have general/permanent access to files outside of your app's scoped storage

Mark Allemang

unread,
Jul 22, 2025, 10:36:07 AMJul 22
to DroidScript
I had given up on this but finally found a perfect solution.

1) use llamalabs   "automate" to send the email( in this example i'm also snaping the photo)
(see attach screen shot)


2) use Droidscript to initiate the flow in Automate:
function SendEmail()
{
    app.ShowPopup("Sending Email");
    let action = "com.llamalab.automate.intent.action.START_FLOW";
    let uri = "content://com.llamalab.automate.provider/flows/13/statements/1"
    let packageName = "com.llamalab.automate";
    let className = null;
    app.SendIntent(packageName,className,action,null,uri,null)

}


Yay...thank-you to all that tried to help me....and there were several of you.
Screenshot_20250722-102649_Automate.jpg
Reply all
Reply to author
Forward
0 new messages