简体   繁体   English

如何在没有Mail应用程序的情况下通过AppleScript发送电子邮件

[英]How to send an email through AppleScript without the Mail app

I need to create an AppleScript program that will send an email no matter what. 我需要创建一个AppleScript程序, 无论该程序如何发送电子邮件 That means that the Apple Mail app is out of question, because some people do not have Mail set up. 这意味着Apple Mail应用程序毫无疑问,因为有些人没有设置Mail。 I thought that one way would be to send the email through Terminal, but I have no idea how. 我认为一种方法是通过终端发送电子邮件,但我不知道如何发送。 I need some way to send an email through AppleScript without the Mail app. 我需要某种方式通过不带Mail应用程序的AppleScript发送电子邮件。

Here you can find a python script to send email and there's applescript code on the page to show how you can call the python script from applescript. 在这里,您可以找到发送电子邮件python脚本,页面上有applescript代码,以显示如何从applescript调用python脚本。 Note that you have to supply smtp information to the script, which is essentially the information that you use to setup Mail.app. 请注意,您必须向脚本提供smtp信息,该信息实质上是用于设置Mail.app的信息。

So if you wanted a "no matter what" type of solution you would have to include your own smtp info in your code. 因此,如果您想要“无论如何”类型的解决方案,则必须在代码中包含自己的smtp信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM