【问题标题】:Shell script to send email is not working from Informatica用于发送电子邮件的 Shell 脚本在 Informatica 中不起作用
【发布时间】:2022-10-08 02:19:43
【问题描述】:

我有一个非常简单的脚本

echo "Test email body" | mailx -s "Subject" vinay@informatica.com

当我从 linux 运行脚本时,它工作正常,我正在收到电子邮件

但是,当我在 informatica 中的会话后成功命令或命令任务中使用相同的脚本时,脚本成功但我没有收到邮件

另外,在没有调用脚本的情况下,我直接在 post session success 命令中给出了 mail 命令

echo "Test email body" | mailx -s "Subject" vinay@informatica.com

尽管如此,它仍然无法正常工作。

有人可以帮我解决这个问题。

【问题讨论】:

  • echo 是否作为独立二进制文件存在于您的系统中? which echo ...如果不是,那很可能是你的问题。很有可能是 informatica没有执行shell-builtins,但我根本不知道informatica。对此进行测试的一个选项是将上面的行添加到脚本中,然后从 informatica 运行脚本。
  • 我在 echo 语句上方包含了 #!/usr/bin/sh 仍然没有结果
  • 你是什​​么意思?您是否将其全部放入 shell 脚本中,将其设置为可执行文件并从那里运行它?也可能是 informatica 不喜欢 shell 功能,如管道或重定向命令.

标签: linux unix informatica informatica-powercenter workflow-manager-1.x


【解决方案1】:

触摸 email.txt > 你的消息 猫 /tmp/email.txt

主题:终端邮件发送

电子邮件内容第 1 行 电子邮件内容第 2 行

【讨论】:

  • explonation: sendmail user@example.com < /tmp/email.txt
  • 能否请您详细说明。您要我将邮件内容复制到文件中并在变量中复制主题吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-10-13
  • 2010-12-19
  • 1970-01-01
  • 2018-09-06
  • 2011-09-16
  • 1970-01-01
相关资源
最近更新 更多