【发布时间】:2020-04-03 14:28:40
【问题描述】:
有没有办法在 Linux 中使用 mail 或 mailx 命令将 html 文件发送到邮件正文。尽管有很多线程,但我四处搜索并没有找到任何有效的方法。在线程上我看到Mailx send html message 但没有任何效果。
我使用的是下面的命令,但没有按预期工作。
$ mail -s "$(echo -e "This is Subject\nContent-Type: text/html")" kulfi@tap.com < OneView_Sheet.html
$ mailx -s "$(echo -e "This is Subject\nContent-Type: text/html")" kulfi@tap.com < OneView_Sheet.html
上述命令改为发送html源内容如下...
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>OV_NAME</th>
<th>Composer_Firmware</th>
<th>SAS_20_Firmware_Version</th>
<th>SAS12_Firmware_Version</th>
<th>VC_Firmware_Version</th>
</tr>
</thead>
<tbody>
在正文上的所需示例:
【问题讨论】:
标签: linux email html-email mailx