Applescripting Chrome email

Hello all, I need some guidance please. Since recent security changes at Microsoft. AppleMail and Outlook on my very old MacBook (El Capitan) can no longer send/recieve emails as authorisation cannot bind. Before I could automate email (hotmail account) sending with AppleScript. I now use a web mail page for Outlook via Chrome but having to send manually. Can I get some advice on how to control, with AppleScript, the attached webpage to:

  1. open a new email
  2. add recipient in the To field
  3. add a subject
  4. attach a file
  5. send email.

Or is there another solution (apart from buying a newer Mac!). Thank you

You can install Python, install the super easy-to-use O365 library using python3 -m pip install O365 and write a script that calls that library. The library uses Microsoft's API directly. You can learn more about the library here.

short answer: NO

Long answer: Possible, but you will have to learn javascript. This is the same for every browser, they offer commands and classes to manipulate the window and tabs and only one command to manipulate HTML through javascript.

For Google Chrome that's the command "execute". With this command you can do what ever javascript can do, but you have to know/learn the language.

Applescripting Chrome email
 
 
Q