通过python或php从gmail获取附件 [英] Fetching attachments from gmail via either python or php

查看:132
本文介绍了通过python或php从gmail获取附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图找到关于如何从python或PHP中的gmail帐户中检索附件的信息,我希望这里的某个人能够得到一些帮助,谢谢。



相关:


imaplib.IMAP4_SSL code>来访问它。

使用每封邮件的原始文本作为 email.message_from_string 的参数,以便处理任何附件。 / p>

I have been trying to find information on how to retrieve attachments from a gmail account in either python or PHP, I'm hoping that someone here can be of some help, thanks.

Related:

解决方案

You will have to enable IMAP access to your GMail account (Settings → Forwarding and POP/IMAP), and then use imaplib.IMAP4_SSL to access it.

Use the raw text of every message as an argument to email.message_from_string in order to process any attachments.

这篇关于通过python或php从gmail获取附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆