首页 > 解决方案 > 我如何去特定用户的电子邮件收件箱或谷歌日历和所有其他谷歌应用程序

问题描述

这是我的代码。

<!DOCTYPE html>
<html>
 <head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>repl.it</title>
  <link href="style.css" rel="stylesheet" type="text/css" />
 </head>
 <body>
   <script src="script.js"></script>
   <a href="https://mail.google.com" target="_blank">go email</a>
   <br><br>
   <a href="https://calendar.google.com/" target="_blank">go calendar</a>
 </body>
</html>

在此处输入图像描述

但是当我点击两个链接时,服务器会在默认电子邮件收件箱和谷歌日历(在我的浏览器中设置)上重定向我。而且我在我的 chrome 浏览器中有多个用户登录。所以我想去特定的用户电子邮件地址。

我的问题是我怎样才能去特定用户的电子邮件或日历。

提前致谢。

标签: javascripthtmlruby-on-railsgoogle-chromeemail

解决方案


当您更改帐户时,您可以看到 google 也更改了 url 中的一部分。

例如:

https://calendar.google.com/calendar/u/0/r

更改为

https://calendar.google.com/calendar/u/1/r

ID ( 0, 1) 似乎是您登录的顺序。

我尝试了当您用电子邮件替换此 ID 时会发生什么。它似乎有效。

https://calendar.google.com/calendar/u/me@gmail.com

为用户打开日历me@gmail.com

注意:我没有找到任何官方文档等描述这一点。所以也许这对你有用。当然,谷歌可以随时更改此设置。我不会依赖它,也不会在生产中使用它。


推荐阅读