unbale 将邮件发送到通讯组列表,附件为 unix/solaris 10

问题描述

尝试将带有附件的邮件发送到通讯组列表,但没有成功

对于已识别的 DL 似乎不合适,但是当使用邮件 ID(例如“[email protected],[email protected]”)指定时,它工作正常。

我有 Oracle Solaris 10。

代码就像..

#!/usr/bin/bash

mailx -s "test_mail" -r [email protected] -t "DL-xzy@outlook.com" < text_file.txt

#!/usr/bin/bash

uuencode text_file.txt text_file.txt| mailx -s " test mail" -t "DL-xzy@outlook.com"

结果

Ignoring recipients on command line with -t
No recipients specified

或 使用“邮件”选项时

mail  -t "DL-xzy@outlook.com" -s "test_mail" -r [email protected] < text_file.txt

结果:-

mail: Options MUST PRECEDE persons

解决方法

使用这个命令:

uuencode text_file.txt text_file.txt| mailx -s " test mail"  "[email protected]"

DL 本身是由邮件服务器管理的,-t 的作用完全不同