Using python to send email

Microsoft is moving toward a new version of Outlook on the Mac that does not support AppleScript (at least the current versions do not). Support staff at Microsoft could not give me any information about the prospect of this changing.

I will probably need to come up with a new approach for sending email with PanX. I want to consider using Python, but know nothing about it. Can anyone give me some help on whether this is viable and, if so, suggest what I need to learn to accomplish this? It would be used on a collection of computers in a law office, so the users have limited computer skills. Whatever system is adopted needs to be simple to use and robust.

Thanks for any feedback.

It’s extremely viable and Panorama is very capable of handling it. Check out Mailbox in the Database Exchange. It’s built with Pan X and Python.

I just bought a Python course from the “Great Courses” website. It was on sale for $35 but I have not started it yet. Unfortunately the regular price is $269.95. But they often have sales.

https://www.thegreatcourses.com/courses/how-to-program-computer-science-concepts-and-python-exercises

It is reassuring that James Cook has reassuring information as to the utility of my purchase.

I hope that I am not breaking some kind of rule with these comments.

Panorama has the ability to generate Python scripts or to simply trigger them. It can do as much with Ruby, JSON, PHP, AppleScript… I’ve used some of them but have found Python especially useful and there are numerous existing scripts available to borrow and revise as needed.

There are also people here, like David Thompson, who jump in to lend a hand any time you get stuck.

I have been unable to get Python Mail database to work; I have tried using an Office365 account and an iCloud account to send mail. In each case I get an error message back saying “Sending error:…” I just installed Python 3.9.6 and added that to PanX Scripting Languages settings.
Any suggestions on what else I can try. Here are my Office365 settings:

See POP, IMAP, and SMTP settings - Microsoft Support for info from MS. I also tried checking SSL. The Office365 help page says that it uses StartTLS authentication; don’t know if that is the source of the problem.

On the surface your SMTP settings look correct but I have no way to confirm them.

Please do be sure that you have the very latest download. There is an issue in the Python script involving attachments. Recently I aside-stepped it in the code until I can properly resolve it.

Oh, second look and I see that you do not have TLS selected. Try that with port 587.