我试图通过Acumatica中的电子邮件发送PDF报告。如果我使用Google作为我的SMTP服务器,则报告发送正常。但是,当我从AWS使用SES时,我收到以下错误:
554交易失败:预期';',得到" \"
与AWS交谈后,他们认为附加PDF的Mime类型导致了问题。我想检查是否有人可以看到电子邮件有任何问题。我敢打赌,问题出在客户方(Acumatica),而不是SES。
使用SES的其他电子邮件客户端必须在客户端修复以使用SES。
以下是我从Google SMTP服务器提取的Raw消息:
Return-Path: <adam.b@mywebsite.com>
Received: from PX.Common.Mail.SmtpSender (ec2-54-175-151-178.compute-1.amazonaws.com. [54.175.151.178])
by smtp.gmail.com with ESMTPSA id e7sm178452qtb.9.2016.08.18.11.31.10
for <adam.b@mywebsite.com>
(version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
Thu, 18 Aug 2016 11:31:10 -0700 (PDT)
From: "AdamGmail" <adam.b@mywebsite.com>
To: adam.b@mywebsite.com
Reply-To: "AdamGmail" <adam.b@mywebsite.com>
Subject: test
Content-Type: multipart/mixed;boundary=1fcdf676_05de_4357_930f_9171591a4d05
Message-ID: <b5679888-b0ce-467f-a69b-e65592fd4d60_acumatica@smtp.gmail.com>
Date: Thu, 18 Aug 2016 13:31:09 -0500
--1fcdf676_05de_4357_930f_9171591a4d05
Content-Type: text/html;charset=utf-8
Content-Transfer-Encoding: base64
PEhUTUw+PGhlYWQ+PHN0eWxlPi8qIFJURSBzdHlsZSBiZWdpbiAqLy5yaWNoIG9sLCAucmljaCB1
bCB7IG1hcmdpbi10b3A6IDBweDsgbWFyZ2luLWJvdHRvbTogMHB4O30NCi5yaWNoIC5pbWdicmRy
IHsNCglib3JkZXI6IHNvbGlkIDFweDsNCn0NCi5yaWNoSWNvbiB7DQoJZGlzcGxheTogaW5saW5l
LWJsb2NrOw0KCWJhY2tncm91bmQtaW1hZ2U6IHVybChJbWFnZXMvc3ByaXRlX21haW41LnBuZyk7
DQoJYmFja2dyb3VuZC1yZXBlYXQ6IG5vLXJlcGVhdDsNCgl3aWR0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CW1hcmdpbi10b3A6IDBweDsNCgltYXJnaW4tYm90dG9tOiAwcHg7DQoJcGFkZGlu
Zy1sZWZ0OiA1cHg7DQp9DQoucmljaCBib2R5IHtmb250LWZhbWlseTogYXJpYWw7IGZvbnQtc2l6
ZTogc21hbGx9DQoNCi5yaWNoIC5HcmF5Qm94IHsNCgltYXJnaW4tbGVmdDogOHB4Ow0KfQ0KDQou
cmljaCAuc291cmNldGFibGUgeyBmb250LXNpemU6MS4zZW07fQ0KDQoNCi8qIFJURSBzdHlsZSBl
bmQgKi88L3N0eWxlPjwvaGVhZD48Ym9keSBzcGVsbGNoZWNrPSJ0cnVlIiAgY2xhc3M9InJpY2gi
IHN0eWxlPSJtYXJnaW46IDBweDsgcGFkZGluZzogMHB4OyBmb250LWZhbWlseTogYXJpYWw7IGZv
bnQtc2l6ZTogc21hbGw7Ij4KdGVzdDwvYm9keT48L0hUTUw+
--1fcdf676_05de_4357_930f_9171591a4d05
Content-Type: application/pdf;name=duparapcheck - (8_18_2016).pdf
Content-Transfer-Encoding: base64
Content-ID: <0cf14c8a-ded0-4fba-a161-50d1d4a9df61>
JVBERi0xLjUKJdP0zOEKMiAwIG9iag0KPDwNCi9UeXBlL1BhZ2UNCi9QYXJlbnQgMSAwIFINCi9N
ZWRpYUJveFswIDAgNTk0Ljc1IDg0MS41XQ0KL0NvbnRlbnRzIDUgMCBSDQovUmVzb3VyY2VzIDYg
MCBSDQo+Pg0KZW5kb2JqDQo2IDAgb2JqDQo8PA0KL1Byb2NTZXQgWy9QREYvVGV4dC9JbWFnZUIv
SW1hZ2VDL0ltYWdlSV0NCi9Gb250DQo8PA0KL0ZvbnQzIDMgMCBSDQo+Pg0KPj4NCmVuZG9iag0K
NSAwIG9iag0KPDwNCi9GaWx0ZXIgWy9GbGF0ZURlY29kZV0NCi9MZW5ndGggMzA0DQo+Pg0Kc3Ry
ZWFtDQp4nJ3SzU+DMBQA8HuT/g/vqAegn6x4VDajBxO3Jh6Mh40VnY4PkcWPv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YXRlKEQ6MDAwMTAxMDEwMDAw
MDApDQo+Pg0KZW5kb2JqDQo4IDAgb2JqDQo8PA0KL1R5cGUvQ2F0YWxvZw0KL1BhZ2VNb2RlIC9V
c2VOb25lDQovUGFnZXMgMSAwIFINCj4+DQplbmRvYmoNCnhyZWYNCjAgOQ0KMDAwMDAwMDAwMCA2
NTUzNSBmDQowMDAwMDAwNjE3IDAwMDAwIG4NCjAwMDAwMDAwMTUgMDAwMDAgbg0KMDAwMDAwMDY4
MCAwMDAwMCBuDQowMDAwMDAwODM3IDAwMDAwIG4NCjAwMDAwMDAyMjggMDAwMDAgbg0KMDAwMDAw
MDEzMSAwMDAwMCBuDQowMDAwMDAxMDM2IDAwMDAwIG4NCjAwMDAwMDExNTcgMDAwMDAgbg0KdHJh
aWxlcg0KPDwNCi9JbmZvIDcgMCBSDQovUm9vdCA4IDAgUg0KL1NpemUgOQ0KPj4NCnN0YXJ0eHJl
Zg0KMTIzMQ0KJSVFT0YNCg==
--1fcdf676_05de_4357_930f_9171591a4d05--
答案 0 :(得分:0)
我收到了Acumatica的更新,他们将在第6版修复此问题,并会在发布该版本时通知我。
它将被识别为AC-72336 - 通过AWS-SES发送带有文件名空格的PDF报告作为电子邮件给出错误。 2016年9月1日
答案 1 :(得分:0)
我在普通的旧Python和smtplib
上遇到了类似的错误:
smtplib.SMTPDataError: (554, b'Transaction failed: Expected \';\', got "/"')
我用print(message.as_string())
打印出邮件内容。事实证明我的MIME类型有错误:
Content-Type: text/text/plain; charset="us-ascii"
更改构建MIMEText对象的方式解决了问题:
- message = MIMEText(message_body, 'text/plain')
+ message = MIMEText(message_body, 'plain')
message['Subject'] = message_subject
答案 2 :(得分:0)
我还遇到了与以下相同的错误:
由于以下错误而无法发送邮件:ORA-29279:SMTP永久错误:554事务失败:预期为'/',得到了; Emai在此处发送异常。
我的根本原因是打猎: 先前的代码:
If l_file_extension = 'pdf' THEN
write_mime_header(p_mail_conn, 'Content-Type', 'mime_type; name="' || p_filename || '"');
end if;
现在更改为关注,然后可以正常工作。
If l_file_extension = 'pdf' THEN
write_mime_header(p_mail_conn, 'Content-Type', 'application/pdf; name="' || p_filename || '"');
end if;