来自 iSeries 的带有附件的邮件

发布于 2024-07-10 12:18:49 字数 73 浏览 6 评论 0原文

有没有办法从 iSeries 终端发送电子邮件,并从 IFS 添加附件? 我知道如何使用 SNDDST 实用程序发送普通电子邮件。

Is there a way to send an email from an iSeries terminal, adding an attachment from the IFS? I know how to send a normal email using the SNDDST utility.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

自我难过 2024-07-17 12:18:49

有两种主要方法可以做到这一点。

  1. Do-It-Yourselfer 将使用 QtmmSendMail API
  2. ,否则您还可以使用其他几种免费和购买的产品。 我推荐的有:
    • MAILTOOL - 目前 399 美元。 根据您想要执行的操作,如果您想通过电子邮件发送假脱机,我会推荐 SplTool Suite文件。
    • RPGMail - 使用 JavaMail 的免费 API

There is two main methods of doing this.

  1. The Do-It-Yourselfer will use QtmmSendMail API
  2. Otherwise there are several other free and purchased products that you could use. The ones I would recommend are:
    • MAILTOOL - Currently $399. Depending on what you are trying to do, I would recommend SplTool Suite if you want to email out spool files.
    • RPGMail - Free API making use of JavaMail
年少掌心 2024-07-17 12:18:49

最新版本的操作系统附带 SNDSMTPEMM 命令已包含在内。 它非常易于使用,只需填充适当的参数即可包含邮件正文和附件。

这就是我向系统上拥有它并且需要简单且免费的东西的人推荐的。 为了更加稳健,有 Brad Stone 的 MAILTOOL Plus,它是可作为付费订阅。

以下信息是我的原始答案,略有更新,主要用于历史目的:


在我工作的地方,我们使用 MMAIL。 它成本低廉,并提供易于使用的命令。 例如,我总是按如下方式通过电子邮件发送流文件(在 CLP 内):

  MMAIL/EMLSTMF SUBJECT('Monthly Sales Reports') +
    FROMNAME('AS/400') FROMADDR('[email protected]') +
    TO('[email protected]'/Jim Smith/*TO +
       '[email protected]'/Bob Jones/*CC) +
    STMF(&FILE1 &FILE2 &FILE3)

还有其他可用参数(如果使用交互式提示符,则非常不言自明),以及其他几个命令来处理最常见的情况。常见用例。 如果您想要更精细的控制,或者需要发送更复杂的消息,该包还提供了一个 API,但我从来不需要比提供的命令更多的命令。

该实用程序曾经是免费的,但作者现在需要“捐赠”50 美元才能完全访问其网站的下载。

Recent versions of the operating system come with the SNDSMTPEMM command already included. It's quite easy to use and allows you to include both a message body and an attachment simply by populating the appropriate parameters.

That is what I would recommend for anyone who has it on their system, and needs something simple and free. For more robustness, there is Brad Stone's MAILTOOL Plus, which is available as a paid subscription.

The below information is my original answer, slightly updated, mainly for historical purposes:


Where I work we use MMAIL. It's low-cost and provides easy-to-use commands. For example, I happen to e-mail stream files all the time as follows (within a CLP):

  MMAIL/EMLSTMF SUBJECT('Monthly Sales Reports') +
    FROMNAME('AS/400') FROMADDR('[email protected]') +
    TO('[email protected]'/Jim Smith/*TO +
       '[email protected]'/Bob Jones/*CC) +
    STMF(&FILE1 &FILE2 &FILE3)

There are other parameters available as well (pretty self-explanatory if you use the interactive prompt), and several other commands to handle the most common use cases. The package does also provide an API if you want finer control, or need to send much more complex messages, but I have never needed more than the provided commands.

This utility used to be free, but the author now requires a "donation" of $50 for full access to downloads from his site.

顾北清歌寒 2024-07-17 12:18:49

您可以使用 Java 和 JavaMail API 编写自己的程序。

You could code your own program with Java and the JavaMail API.

○闲身 2024-07-17 12:18:49

我有一段时间没看过了,但 i5/OS 上应该有一些 QSH 可以使用的 unixy 邮件实用程序。 如果没有,那么移植一个应该是一件简单的事情。 在这里寻找想法:http://www.shelldorado.com/articles/mailattachments.html

但我更喜欢 JavaMail 的想法。 只需快速谷歌一下即可找到一个包含 JavaMail 使用示例的网站: http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail.html

使用 JavaMail,您还可以阅读邮件(如果也可以)有用。

更新:您说您已经可以从 IFS 添加附件。 命令 CATSPLF (QSH 实用程序的一部分)可以检索假脱机文件并将其写入标准输出。 这意味着您可以将假脱机文件传输到 IFS。 但你必须对创造他们的工作有很多了解。

喜欢:

    catsplf ... > /my/files/path

I found this at http://www.mcpressonline.com/tips-techniques/cl/techtip-read-printer-output-with-qshell.html.
CATSPLF was introduced in V5R3.

I have not looked in a while but there should be some unixy mail utilities on i5/OS that QSH could use. If not, it's supposedly a simple matter to port one. Look here for ideas: http://www.shelldorado.com/articles/mailattachments.html

But I like the JavaMail idea better. Just a quick google yields a site that has examples of JavaMail usage: http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail.html

With JavaMail you can also read mail if that could also be useful.

Update: You say you can already add attachments from the IFS. The command CATSPLF (part of QSH utilities) can retrieve spool files and write them to standard output. Which means you can transfer spool files to the IFS. But you have to know a lot about the job that created them.

Like:

    catsplf ... > /my/files/path

I found this at http://www.mcpressonline.com/tips-techniques/cl/techtip-read-printer-output-with-qshell.html.
CATSPLF was introduced in V5R3.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文