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
Email 是否可以通过SMTP将超过25MB的文件附加到传出的gmail邮件?_Email_Google Drive Api_Gmail_Phpmailer_Attachment - Fatal编程技术网

Email 是否可以通过SMTP将超过25MB的文件附加到传出的gmail邮件?

Email 是否可以通过SMTP将超过25MB的文件附加到传出的gmail邮件?,email,google-drive-api,gmail,phpmailer,attachment,Email,Google Drive Api,Gmail,Phpmailer,Attachment,Gmail允许普通浏览器用户“附加”大于25MB的文件,方法是先将文件上传到谷歌硬盘,然后再发送 这是通过gmail用户界面无缝完成的,用户只需额外点击一次,通知他们该文件将上传到谷歌硬盘,并作为链接发送,而不是普通的文件附件 当通过SMTP附加超过25mb的文件时,有没有办法让付费的gsuite gmail帐户自动为您这样做 还是我必须像他们那样做?通过Google Drive API上传,然后通过电子邮件发送Google Drive下载链接?通过浏览器窗口中的GMail UI访问的免费Gsu

Gmail允许普通浏览器用户“附加”大于25MB的文件,方法是先将文件上传到谷歌硬盘,然后再发送

这是通过gmail用户界面无缝完成的,用户只需额外点击一次,通知他们该文件将上传到谷歌硬盘,并作为链接发送,而不是普通的文件附件

当通过SMTP附加超过25mb的文件时,有没有办法让付费的gsuite gmail帐户自动为您这样做


还是我必须像他们那样做?通过Google Drive API上传,然后通过电子邮件发送Google Drive下载链接?

通过浏览器窗口中的GMail UI访问的免费Gsuite帐户会自动向驱动器添加一个大型附件,并显示“您的文件大于25 MB。它将作为Google Drive链接发送。”。因此,通过浏览器窗口中的GMail用户界面访问的付费Gsuite帐户似乎也会这样做(但我无法测试,因为缺少付费帐户)

然而,这项服务是GMail在线电子邮件客户端的一部分。很明显,您正在使用不同的(未指定,可能是脱机)电子邮件客户端,并且可能在它和Google SMTP服务器之间使用一个或多个SMTP服务器

要获取所需内容,您需要客户端或smtp服务器识别文件附件大于设置的大小,然后自动将文件上载到驱动器并插入驱动器链接

也许可以找到一个与谷歌硬盘集成到这种程度的电子邮件客户端,Everdesk和EMClient都声称与谷歌集成,但我没有调查他们是否会自动上传像在线Gmail界面这样的大型附件


Zapier、Sendtodocs和IFTTT等在线服务在这种情况下不起作用,因为它们依赖于将内容发送到它们,而且很明显,大型附件将被Google SMTP服务器阻止。

通过浏览器窗口中的GMail UI访问的免费Gsuite帐户,会自动将大型附件添加到驱动器并显示内容“您的文件大于25 MB。因此,通过浏览器窗口中的GMail用户界面访问的付费Gsuite帐户似乎也会这样做(但我无法测试,因为没有付费帐户)

但是,此服务是GMail在线电子邮件客户端的一部分。显然,您正在使用不同的(未指定,可能是脱机)电子邮件客户端,并且可能在它和Google SMTP服务器之间使用一个或多个SMTP服务器

要获取所需内容,您需要客户端或smtp服务器识别文件附件大于设置的大小,然后自动将文件上载到驱动器并插入驱动器链接

也许可以找到一个与谷歌硬盘集成到这种程度的电子邮件客户端,Everdesk和EMClient都声称与谷歌集成,但我没有调查他们是否会自动上传像在线Gmail界面这样的大型附件


像Zapier、Sendtodocs和IFTTT这样的在线服务在这种情况下不起作用,因为它们依赖于获取内容,而且很明显,大型附件将被Google SMTP服务器阻止。

问得好。我做了一个测试,给自己发了这样的附件,然后在gmail中查看了原始内容。这就是它所说的

Date: Thu, 2 Mar 2017 08:36:40 +0000
Subject: gmail drive test
To: Todo <foo@bar.com>
Content-Type: multipart/alternative; boundary=001a114a970436d05b0549bb55bd

--001a114a970436d05b0549bb55bd
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

=E2=80=8B
 Untitled spreadsheet
<https://docs.google.com/spreadsheets/d/149LLw1nY24vlYx_d=
sWn4QWwnM/edit?usp=3Ddrive_web>
=E2=80=8B

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

<div dir=3D"ltr">=E2=80=8B<br><div class=3D"gmail_chip gmail_drive_chip" st=
yle=3D"width:396px;height:18px;max-height:18px;background-color:#f5f5f5;pad=
ding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;fo=
nt-size:13px;border:1px solid #ddd;line-height:1"><a href=3D"https://docs.g=
oogle.com/spreadsheets/d/149LLw1nY24vlYx_dsig/edit?=
usp=3Ddrive_web" target=3D"_blank" style=3D"display:inline-block;overflow:h=
idden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;paddin=
g:1px 0px;border:none;width:100%"><img style=3D"vertical-align: bottom; bor=
der: none;" src=3D"https://ssl.gstatic.com/docs/doclist/images/icon_11_spre=
adsheet_list.png">=C2=A0<span dir=3D"ltr" style=3D"color:#15c;text-decorati=
on:none;vertical-align:bottom">Untitled spreadsheet</span></a></div>=E2=80=
=8B<br></div>

--001a114a970436d05b0549bb55bd--
日期:2017年3月2日星期四08:36:40+0000
主题:gmail驾驶考试
收件人:Todo
内容类型:多部分/可选;边界=001a114a970436d05b0549bb55bd
--001a114a970436d05b0549bb55bd
内容类型:文本/普通;字符集=UTF-8
内容传输编码:引用可打印
=E2=80=8B
无标题电子表格
=E2=80=8B
--001a114a970436d05b0549bb55bd
内容类型:text/html;字符集=UTF-8
内容传输编码:引用可打印
=E2=80=8B
=E2=80= =8B
--001a114a970436d05b0549bb55bd--

所以看起来你所需要的只是一个单独的mime部分中的web链接,GMail web客户端会自动处理它。

好问题。我做了一个测试,给自己发送了这样一个附件,然后在GMail中“查看原始内容”。这就是它所说的

Date: Thu, 2 Mar 2017 08:36:40 +0000
Subject: gmail drive test
To: Todo <foo@bar.com>
Content-Type: multipart/alternative; boundary=001a114a970436d05b0549bb55bd

--001a114a970436d05b0549bb55bd
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

=E2=80=8B
 Untitled spreadsheet
<https://docs.google.com/spreadsheets/d/149LLw1nY24vlYx_d=
sWn4QWwnM/edit?usp=3Ddrive_web>
=E2=80=8B

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

<div dir=3D"ltr">=E2=80=8B<br><div class=3D"gmail_chip gmail_drive_chip" st=
yle=3D"width:396px;height:18px;max-height:18px;background-color:#f5f5f5;pad=
ding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;fo=
nt-size:13px;border:1px solid #ddd;line-height:1"><a href=3D"https://docs.g=
oogle.com/spreadsheets/d/149LLw1nY24vlYx_dsig/edit?=
usp=3Ddrive_web" target=3D"_blank" style=3D"display:inline-block;overflow:h=
idden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;paddin=
g:1px 0px;border:none;width:100%"><img style=3D"vertical-align: bottom; bor=
der: none;" src=3D"https://ssl.gstatic.com/docs/doclist/images/icon_11_spre=
adsheet_list.png">=C2=A0<span dir=3D"ltr" style=3D"color:#15c;text-decorati=
on:none;vertical-align:bottom">Untitled spreadsheet</span></a></div>=E2=80=
=8B<br></div>

--001a114a970436d05b0549bb55bd--
日期:2017年3月2日星期四08:36:40+0000
主题:gmail驾驶考试
收件人:Todo
内容类型:多部分/可选;边界=001a114a970436d05b0549bb55bd
--001a114a970436d05b0549bb55bd
内容类型:文本/普通;字符集=UTF-8
内容传输编码:引用可打印
=E2=80=8B
无标题电子表格
=E2=80=8B
--001a114a970436d05b0549bb55bd
内容类型:text/html;字符集=UTF-8
内容传输编码:引用可打印
=E2=80=8B
=E2=80= =8B
--001a114a970436d05b0549bb55bd--
因此,看起来您所需要的只是单独mime部分中的web链接,GMail web客户端自动处理它