在Gmail中撰写邮件的网址(具有完整的Gmail界面并指定为,bcc,主题等)

rob*_*ord 76 gmail hyperlink google-apps

我找到了一个帖子,它提供了一个链接示例,它只打开了一个撰写消息窗口.但是,我希望它打开一个带有完整Gmail界面的窗口,但可以编写新邮件.

当然这有效:

https://mail.google.com/mail/u/0/#compose

但是,我还想添加一个主题,to,bcc等.我尝试了类似下面的内容,但无济于事:

https://mail.google.com/mail/?to=inbox@example.com&bcc=admin@example.com&subject=Hey#compose

有任何想法吗?谢谢.

rob*_*ord 139

这似乎有效(暂时):

https://mail.google.com/mail/?view=cm&fs=1&to=someone@example.com&su=SUBJECT&body=BODY&bcc=someone.else@example.com

  • @cronoklee我知道它已经过时了,但也许有人可以使用它...对于谷歌应用程序,使用http://mail.google.com/a/domain.com/mail?view = cm ... (5认同)
  • 您知道如何设置from参数吗?我在gmail中有几个帐户可以在发送时选择...,我希望能够通过url参数设置所需的帐户 (2认同)
  • 有人知道是否可以附加文件或在 URL 中包含文件吗? (2认同)

Mat*_*hew 34

I thought I'd try and consolidate the information from several good answers and comments and provide some additional information. Examples first then background and explanation of terminology below.

N.B. All links will fall back to the default account if there is no match

Simple Compose Link

Opens the inbox with a compose window in the bottom right

  • Default account:
    https://mail.google.com/mail/#compose
  • Specific account by index (second in this example):
    https://mail.google.com/mail/u/1/#compose
  • Specific account by email address (lee@example.org in this example):
    https://mail.google.com/mail/u/lee@example.org/#compose
  • Any account from specific domain (example.edu in this example):
    https://mail.google.com/a/example.edu/mail/#compose
  • From specific delegated mailbox (id abcd1234efgh5678 in this example):
    https://mail.google.com/mail/d/abcd1234efgh5678/#compose
  • From specific delegated mailbox belonging to non-default account (id 1234efgh5678ijkl, fourth user):
    https://mail.google.com/mail/u/3/d/1234efgh5678ijkl/#compose

Each example above automatically redirects from #compose to #inbox?compose=new. You can use either URL.

Custom compose links

Include a to address, subject, body, cc and bcc by opening the Compose Message (cm) view directly. This opens the compose message view fullscreen (even without fs=1 parameter). May struggle with some special characters in the URL.

  • Default account:
    https://mail.google.com/mail/?view=cm&to=morgan@example.com&su=SUBJECT&body=BODY&bcc=dakota@example.com
  • Specific account by index (second in this example):
    https://mail.google.com/mail/u/1/?view=cm&to=morgan@example.com&su=SUBJECT&body=BODY&bcc=dakota@example.com
  • Specific account by email address (lee@example.org in this example):
    https://mail.google.com/mail/u/lee@example.org/?view=cm&to=morgan@example.com&su=SUBJECT&body=BODY&bcc=dakota@example.com
  • Any account from specific domain (example.edu in this example):
    https://mail.google.com/a/example.edu/mail/?view=cm&to=morgan@example.com&su=SUBJECT&body=BODY&bcc=dakota@example.com
  • From specific delegated mailbox (id abcd1234efgh5678 in this example):
    https://mail.google.com/mail/d/abcd1234efgh5678/?view=cm&to=morgan@example.com&su=SUBJECT&body=BODY&bcc=dakota@example.com
  • From specific delegated mailbox belonging to non-default account (id 1234efgh5678ijkl, fourth user):
    https://mail.google.com/mail/u/3/d/1234efgh5678ijkl/?view=cm&to=morgan@example.com&su=SUBJECT&body=BODY&bcc=dakota@example.com

Complex compose links

Anything you can put in a mailto: link can be passed to Gmail. You need to URL encode* the mailto link first. This takes care of accented letters and other special characters that URLs can choke on:

mailto:morgan@example.com?subject=SUBJECT&body=BODY&bcc=dakota@example.com
  v  v  v  v  v  v 
mailto%3Amorgan%40example.com%3Fsubject%3DSUBJECT%26body%3DBODY%26bcc%3Ddakota%40example.com
Run Code Online (Sandbox Code Playgroud)
  • Default account:
    https://mail.google.com/mail/?extsrc=mailto&url=mailto%3Amorgan%40example.com%3Fsubject%3DSUBJECT%26body%3DBODY%26bcc%3Ddakota%40example.com
  • Specific account by index (second in this example):
    https://mail.google.com/mail/u/1/?extsrc=mailto&url=mailto%3Amorgan%40example.com%3Fsubject%3DSUBJECT%26body%3DBODY%26bcc%3Ddakota%40example.com
  • Specific account by email address (lee@example.org in this example):
    https://mail.google.com/mail/u/lee@example.org/?extsrc=mailto&url=mailto%3Amorgan%40example.com%3Fsubject%3DSUBJECT%26body%3DBODY%26bcc%3Ddakota%40example.com
  • Any account from specific domain (example.edu in this example):
    https://mail.google.com/a/example.edu/mail/?extsrc=mailto&url=mailto%3Amorgan%40example.com%3Fsubject%3DSUBJECT%26body%3DBODY%26bcc%3Ddakota%40example.com
  • From specific delegated mailbox (id abcd1234efgh5678 in this example):
    https://mail.google.com/mail/d/abcd1234efgh5678/?extsrc=mailto&url=mailto%3Amorgan%40example.com%3Fsubject%3DSUBJECT%26body%3DBODY%26bcc%3Ddakota%40example.com
  • From specific delegated mailbox belonging to non-default account (id 1234efgh5678ijkl, fourth user):
    https://mail.google.com/mail/u/3/d/1234efgh5678ijkl/?extsrc=mailto&url=mailto%3Amorgan%40example.com%3Fsubject%3DSUBJECT%26body%3DBODY%26bcc%3Ddakota%40example.com

*More information on URL Encoding / Percent Encoding on Wikipedia. At the time of writing, urlencoder.io allows you to encode online and also has links to blog articles on how to URL Encode using a few common languages.

Background and Definitions

  • 您可以登录多个 Gmail 和/或 Google Workspace 帐号。
  • 您在新浏览器中登录的第一个帐户将成为您的默认帐户
  • 如果您使用不同的浏览器或浏览器配置文件,默认帐户可能会有所不同。如果您注销、删除所有帐户并以不同的顺序重新登录,它也可能会发生变化。
  • 如果您登录多个帐户,它们将按登录顺序编入索引。默认帐户的索引为零https://mail.google.com/mail/#inbox如果您登录了多个帐户,导航到通常会将您重定向到您的默认帐户(索引零):https://mail.google.com/mail/u/0/#inbox
  • 您可以通过在之前插入(而用户索引在之后)来指定 Google Workspace 网域/a/<domain>。当您在公司内部提供链接并且希望该链接在其工作帐户中撰写新电子邮件时(无论他们以什么顺序登录到其各个帐户),这可能很有用/mail/u/<index>/mail
  • 仅当您知道委派 ID(以及具有委派权限的帐户的用户索引,如果不是默认帐户)时,您才可以从委派邮箱撰写邮件:
    https://mail.google.com/mail/d/ALGkd7w86mZOVigdDwK63uDpfMPlA2GJN7qSc4P7idKz7ffqTN0L/#compose
    https://mail.google.com/mail/u/0/d/ALGkd7w86mZOVigdDwK63uDpfMPlA2GJN7qSc4P7idKz7ffqTN0L/#compose 或,对于用户号 4,
    https://mail.google.com/mail/u/3/d/ALGkd7w86mZOVigdDwK63uDpfMPlA2GJN7qSc4P7idKz7ffqTN0L/#compose
    注意:委派 ID 是唯一的用户(不同的用户将有不同的委托 ID)并且可能会发生变化(例如,注销并重新登录您的主 Gmail 帐户将为委托帐户生成新的委托 ID)。
    要获取当前的委派 ID,您可以从 Gmail 帐户切换器复制委派邮箱的 URL:
    复制委托邮箱URL获取委托ID


dja*_*ski 19

为此网址添加书签应该会为您提供全屏撰写窗口,而不会产生任何干扰:

https://mail.google.com/mail/?view=cm&fs=1&tf=1

此外,如果您希望面向未来(例如,请参阅此问题中的其他网址如何停止工作),您可以将链接添加为:

mailto:
Run Code Online (Sandbox Code Playgroud)

它将打开您的默认电子邮件客户端,您可能已经为此配置了Gmail.


Tob*_*ühl 10

GMail Web 客户端支持mailto:链接

对于普通@gmail.com账户:https://mail.google.com/mail/?extsrc=mailto&url=...

对于域上的 G Suite 帐户gsuitedomain.comhttps://mail.google.com/a/gsuitedomain.com/mail/?extsrc=mailto&url=...

...需要用urlencoded mailto:链接替换。

演示:https : //mail.google.com/mail/?extsrc=mailto&url=mailto%3A%3Fto%3Dsomeguy%40gmail.com%26bcc%3Dmyattorney%40gmail.com%2Cbuzzfeed%40gmail.com%26subject%3DHi%2520There %26body%3Dbody%2520goes%2520here

mailto:通过阅读 RFC6068了解有关链接的更多信息


小智 8

https://mail.google.com/mail/u/0/x/?&v=b&eot=1&pv=tl&cs=b

此链接适用于在桌面浏览器中直接在m.gmail.com中作为移动设备进行编写.为什么?它真的更快.


小智 6

值得指出的是,如果您有多个Gmail帐户,则可能需要使用URL方法,因为您可以自定义要编写的帐户.

例如

https://mail.google.com/mail/u/0/#inbox?compose=new   
https://mail.google.com/mail/u/1/#inbox?compose=new
Run Code Online (Sandbox Code Playgroud)

  • @Matt是的,您可以使用https://mail.google.com/mail/u/your@email.com/#inbox?compose=new而不是数字索引. (5认同)

jua*_*tas 5

对于铬:

  1. 将您的电子邮件管理器设置为 Gmail

gmail 处理程序

  1. 在地址栏中写mailto:并按回车键。

更轻松:

  1. 编辑搜索引擎:

编辑搜索引擎

编辑搜索引擎

  1. 写 mt 并在地址栏中输入。