【问题标题】:mime-type missing in mailsend email clientmailsend 电子邮件客户端中缺少 mime 类型
【发布时间】:2018-07-10 13:00:08
【问题描述】:

我正在使用“mailsend v.1.19”向网络邮件客户端发送短信。 当我设置 mime-type 时,无论是带有消息正文还是单行消息,我都无法在原始电子邮件中找到它的任何痕迹。

e,g:

mailsend -smtp local-mail.com -f sender@sender.local -t receiver@receiver.local -sub "Another Test Email With HTML body and mime type set from file body" -msg-body ~/justbody.html -starttls -user xxx -pass xxxx -mime-type "text/html"

我故意不为测试目的设置 content-type。

我的 SMPT 摄取器将获得以下没有“text-html”迹象的原始流:

Received: from localhost (unknown [10.91.142.1])
by local-mail.dev.com (Postfix) with ESMTPS
for receiver@receiver.local; Wed, 31 Jan 2018 11:37:10 +0000 (UTC)
Subject: Another Test Email With HTML body and mime type set from file body
From: sender@sender.local
Date: Wed, 31 Jan 2018 11:37:10 +0000
To: receiver@receiver.local
X-Mailer: @(#) mailsend v1.19 (Unix)
X-Copyright: BSD. It is illegal to use this software for Spamming
Mime-version: 1.0
Content-Type: (null); charset=utf-8

我做错了什么?

【问题讨论】:

  • 这看起来不像是一个编程问题;投票结束作为 Stack Overflow 的题外话。
  • 您是否尝试将-mime-type 声明移到-attach 之前?从查看文档来看,它看起来很模糊,也许这会有所作为。
  • 没有附件,这是邮件本身的mime类型设置。
  • 还有另一个选项:-attach file,mime_type,[i/a] (i=inline,a=attachment)
  • 对,那么,您是否尝试将-mime-type 放在-msg-body 之前?

标签: email command-line-interface mime-types email-client


【解决方案1】:

我已经尝试使用 mailsend 并将参数 -content-type 和 mime-type 都放在命令行中的消息正文之前。 结果是头部 Content-type 填充了 mime-type 值。

所以当设置了 mime-type 时,content-type header 包含它的值,当两者都设置时,content-type 仍然取 mime-type 参数值并忽略 content-type。

我认为这个问题与文档中的 mailsend clean 有关,它背后的逻辑是什么。

【讨论】:

  • 我无法真正解析这个细节,但要点似乎是你发现了一个错误。 reporting it的积分
猜你喜欢
  • 2013-03-03
  • 2011-03-21
  • 2022-01-13
  • 1970-01-01
  • 2020-01-16
  • 2011-05-04
  • 1970-01-01
  • 1970-01-01
  • 2010-11-09
相关资源
最近更新 更多