Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Email InvalidParameterValue:重复的标题';内容类型';使用Amazon SES发送邮件时_Email_Amazon Web Services - Fatal编程技术网

Email InvalidParameterValue:重复的标题';内容类型';使用Amazon SES发送邮件时

Email InvalidParameterValue:重复的标题';内容类型';使用Amazon SES发送邮件时,email,amazon-web-services,Email,Amazon Web Services,我正在尝试使用Amazon SES API发送原始电子邮件,以包含附件。 SES回复400状态代码,我不确定我做错了什么,以下是回复: <ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/"> <Error> <Type>Sender</Type> <Code>InvalidParameterValue</Code> <

我正在尝试使用Amazon SES API发送原始电子邮件,以包含附件。
SES回复400状态代码,我不确定我做错了什么,以下是回复:

<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
  <Error>
    <Type>Sender</Type>
    <Code>InvalidParameterValue</Code>
    <Message>Duplicate header 'Content-Type'.</Message>
  </Error>
  <RequestId>ad8cb17c-a8a0-11e4-8898-8924aa87abfa</RequestId>
</ErrorResponse>
该请求已签名,可以与其他请求一起工作,因此我认为这只能是我的电子邮件问题。这是我的信息数据:

Cc: my-verified-email-1@gmail.com
Subject: Hello testing email hahahahaha
Mime-Version: 1.0
Date: 30 Jan 15 23:54 +0700
Content-Type: multipart/mixed; boundary=7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887
From: my-verified-email-2@gmail.com
To: my-verified-email-3@gmail.com
--7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hello <b>testing email</b> with some =E4=B8=96=E7=95=8C and Vi=E1=BB=87t ng=
=E1=BB=AF.
--7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887
Content-Type: text/plain; charset=utf-8; name="test1.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test1.txt"

dGVzdGluZyBzdHJpbmcgd2l0aCBWaeG7h3Qgbmfhu68K
--7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887--
Cc: my-verified-email-1@gmail.com
Subject: Hello testing email hahahahaha
Mime-Version: 1.0
Date: 30 Jan 15 23:54 +0700
Content-Type: multipart/mixed; boundary=7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887
From: my-verified-email-2@gmail.com
To: my-verified-email-3@gmail.com

--7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hello <b>testing email</b> with some =E4=B8=96=E7=95=8C and Vi=E1=BB=87t ng=
=E1=BB=AF.
--7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887
Content-Type: text/plain; charset=utf-8; name="test1.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test1.txt"

dGVzdGluZyBzdHJpbmcgd2l0aCBWaeG7h3Qgbmfhu68K
--7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887--
Cc:my-verified email-1@gmail.com
主题:你好测试邮件哈哈哈哈
Mime版本:1.0
日期:1月30日15:23+0700
内容类型:多部分/混合;边界=7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887
发件人:我的验证电子邮件-2@gmail.com
收件人:我的已验证电子邮件-3@gmail.com
--7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887
内容类型:text/html;字符集=UTF-8
内容传输编码:引用可打印
您好,正在测试电子邮件,其中some=E4=B8=96=E7=95=8C,Vi=E1=BB=87t ng=
=E1=BB=AF。
--7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887
内容类型:文本/纯文本;字符集=utf-8;name=“test1.txt”
内容传输编码:base64
内容处置:附件;filename=“test1.txt”
DGVZDGluzyBZDHJPBMCGD2L0ACBWAGE7H3QGBMFHU68K
--7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887--

好的,我刚刚发现我在第一条边界线之前遗漏了一条新线。信息应改为:

Cc:my-verified email-1@gmail.com
主题:你好测试邮件哈哈哈哈
Mime版本:1.0
日期:1月30日15:23+0700
内容类型:多部分/混合;边界=7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887
发件人:我的验证电子邮件-2@gmail.com
收件人:我的已验证电子邮件-3@gmail.com
--7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887
内容类型:text/html;字符集=UTF-8
内容传输编码:引用可打印
您好,正在测试电子邮件,其中some=E4=B8=96=E7=95=8C,Vi=E1=BB=87t ng=
=E1=BB=AF。
--7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887
内容类型:文本/纯文本;字符集=utf-8;name=“test1.txt”
内容传输编码:base64
内容处置:附件;filename=“test1.txt”
DGVZDGluzyBZDHJPBMCGD2L0ACBWAGE7H3QGBMFHU68K
--7f1a313ee430f85a8b054f085ae67abd6ee9c52aa8d056e7f7e19c6e2887--