如何从 Gmail 中获取发件人姓名?
我正在用 JavaScript 开发 Gmail 的 Firefox 插件。该应用程序将允许用户在一些预设回复之间进行选择(用户在回复之前的电子邮件时将选择的预定义电子邮件)。我需要自动填写发件人的邮件,这样用户就不需要每次都键入它。
示例:
如果用户收到来自“示例名称 [电子邮件受保护] 的邮件”,回复邮件时,正文应写类似以下内容:
亲爱的示例姓名
感谢您的选择.... .. .. .. 此致,第二个示例
如何使“示例名称”(第一个)自动出现在正文中。
谢谢
I am developing a firefox plug-in for gmail in javascript. the application will let the user choose between some canned responses (pre-defined emails which the user will choose, when responding to a previous email). I need the sender's mail to be filled automatically so the user doesn't need to type it each time.
example:
if the user recieves a mail from "Example Name [email protected]", when responding to the mail, the body should say something similar to the following:
dear Example Name
thank you for choosing....
..
..
..
Sincerely, Second Example
How can I make the "Example Name" (the first one) appear automatically in the body.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我了解到您希望从 Gmail 网页中抓取数据。
查看 Gmail 收件箱的 html,似乎它们通过最小化器运行大多数变量,这会让我对引用 id 或类名持谨慎态度。也许他们明天会进行一些小的更改,并且最小化器会为所有内容选择新名称。
从好的方面来看,一些属性似乎很稳定。例如:role='presentation' in
或 email= 在这里
...其中包含您真正想要的信息:
所以我会通过以下方式解决此问题:
I understand you wish to scrape data from a Gmail webpage.
Looking at the html for a Gmail inbox, it seems they run most variables through a minimiser, which would make me cautious about refering to id or classnames. Maybe they make a minor change tomorrow and the minimiser chooses new names for everything.
On the bright side, some attributes seem stable. Eg: role='presentation' in
or email= down here
...which contains the info you really want:
So I would approach this by: