简体   繁体   English

无法通过Google App Engine发送带有zip附件的邮件

[英]unable to send mail with zip attachment over google app engine

I tried sending an e-mail with a pdf attachment over google app engine and it worked. 我尝试通过Google App引擎发送带有pdf附件的电子邮件,并且该电子邮件有效。 I then used the same code with a zip file. 然后,我将相同的代码与zip文件一起使用。 The recipient didnt receive the mail. 收件人没有收到邮件。 When I checked the logs in Google App Engine, no errors were reported either. 当我检查Google App Engine中的日志时,也未报告任何错误。 What could be going wrong? 可能出什么问题了? Can someone please tell me if it is possible to send zip files over mail as attachments using Goog app engine? 有人可以告诉我是否可以使用Goog应用程序引擎将zip文件作为附件发送出去? If yes, can you please tell me how to do it? 如果是,请告诉我该怎么做?

Here is a list of mime types that are allowed as attachments according to the docs. 是根据文档允许作为附件的mime类型的列表。 Zip files are not on the allowed list, while pdf files are. Zip文件不在允许列表中,而pdf文件则在允许列表中。

I suspect (in the absence of further info) that your recipient's mail server/hosting will have possibly binned the mail with the .zip for being a potential virus. 我怀疑(在没有进一步信息的情况下)您收件人的邮件服务器/托管可能会将邮件与.zip合并为潜在病毒。 Many enterprises will have particular rules for accepting/rejecting mail based on attachments, and .zip files are a popular candidate for rejection. 许多企业对于基于附件的接受/拒绝邮件都有特定的规则,.zip文件是拒绝的流行候选者。

If you can reliably send a .pdf, and reliably fail to send a .zip (of similar size) then this is the likely issue. 如果您可以可靠地发送.pdf,而不能可靠地发送.zip(大小相似),则可能是此问题。

It is possible your Mail was filtered out on the recipient's end rather than by the App engine. 您的邮件可能是在收件人的一端而不是由App引擎过滤掉的。

Try re-sending the mail to an address that has neither spam no virus protection, or a spam folder you can check. 尝试将邮件重新发送到既没有垃圾邮件也没有病毒保护功能的地址,也没有可以检查的垃圾邮件文件夹。

Otherwise, make a size comparison (Is the zip file too large on either your, or the recipient's end?) and make sure you have a proper return address so you get informed about errors. 否则,请进行大小比较(zip文件在您的收件方或收件人的端部是否太大?),并确保您有正确的寄信人地址,以便您了解错误。

In addition to being filtered at the recipient side, Google's SMTP servers will reject sending certain attachments deemed as "dangerous", although I'm not sure if/how that would surface as an error in app engine. 除了在接收方进行过滤之外,Google的SMTP服务器还将拒绝发送某些被视为“危险”的附件,尽管我不确定这是否/如何会导致应用引擎错误。 May want to try sending with an attachment you know would/should be rejected (some windows exe, for instance) as a comparison. 可能想要尝试发送带有您知道会/应该被拒绝的附件(例如某些Windows exe)作为比较。

The contents of the zip file may also make a difference (many SMTP servers will look inside them), so try a zip file that only contains the pdf that worked as another data point. 压缩文件的内容也可能有所不同(许多SMTP服务器将在其中查找内容),因此请尝试仅包含用作另一个数据点的pdf的压缩文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM