【发布时间】:2017-11-01 13:48:42
【问题描述】:
我有相当多的格式化 HTML 要作为电子邮件发送出去,我正在使用 cURL 到 mailgun API 来测试它。只要没有内联格式(即从下面删除样式元素),Mailgun 就可以很好地发送 HTML 邮件,但是我介绍的第二个,它会去掉所有引号,并在第一个分号处停止。我是否需要转义其中一些字符,我该怎么做?
curl -s --user 'api:key-xx' \
https://api.mailgun.net/v3/sandbox6ca85c222ca740ee9f3d36436e7e8516.mailgun.org/messages \
-F from='Testy <postmaster@sandbox6ca85c222ca740ee9f3d36436e7e8516.mailgun.org>' \
-F to='myaddress@example.com' \
-F subject='Hello again' \
--form-string html='<html><body>
<p style='font-family:"Calibri",sans-serif;font-size:10.0pt'>some text</p>
</body>
</html>'
【问题讨论】: