博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
web电子邮件客户端插件_如何使电子邮件成为Web应用程序的强大组成部分
阅读量:2518 次
发布时间:2019-05-11

本文共 8647 字,大约阅读时间需要 28 分钟。

web电子邮件客户端插件

The is a powerful tool with . Once setup, all incoming email for a domain or sub-domain is directed to your application. What you can do is endless, but it can be a bit tricky to grok if it is your first time.

是一个功能强大的工具,具有 。 设置完成后,域或子域的所有传入电子邮件都将定向到您的应用程序。 您可以做的是无尽的,但是如果这是您第一次,那么做起来可能会有些棘手。

Giving your customers a way to access your application from their email account is a major way to boost their activity and engagement on your website.

为客户提供一种从其电子邮件帐户访问您的应用程序的方法,是一种提高他们在您的网站上的活动和参与度的主要方法。

One of my favorite popular productivity tools, , gives me a simple way to record and share the tasks that I have completed each day with my teammates.  Each day, sends me an email asking me what I completed today. From my email account, I can easily reply with my completed tasks without having to log into the website. Interestingly, a majority of my teammates complete most of their website updates through email replying.

我最喜欢的最受欢迎的生产力工具之一为我提供了一种简单的方式来记录并与队友共享我每天完成的任务。 每天, 给我发送一封电子邮件,询问我今天完成了什么。 通过我的电子邮件帐户,我无需登录网站即可轻松完成任务。 有趣的是,我的大多数团队成员都通过电子邮件回复完成了大部分网站更新。

You can also create the same powerful functionality with commenting, receiving content via email, and enabling replies to create, continue, and resolve support tickets. With the , from , you can make your applications interactive by inviting replies and responding to users via their email.

您还可以创建相同的强大功能,包括添加评论,通过电子邮件接收内容以及启用回复以创建,继续和解决支持通知单。 使用的 ,您可以通过邀请回复并通过用户的电子邮件回复用户来使应用程序具有交互性。

The SendGrid Parse Webhook lets you parse email contents and attachments from any incoming emails and post the data via JSON to your application. The capability allows you to accomplish the following, from email replies to your website application:

使用SendGrid Parse Webhook,您可以解析任何传入电子邮件中的电子邮件内容和附件,并将数据通过JSON发布到您的应用程序。 此功能使您能够完成以下工作,从电子邮件回复到您的网站应用程序:

  • Post blog entries

    发布博客条目
  • Use email replies to update your mailing list or database

    使用电子邮件回复来更新您的邮件列表或数据库
  • Upload photos and videos

    上传照片和视频
  • Start and resolve support ticket requests

    启动并解决支持请求单

入门 (Getting Started)

The instructions below are for getting the up and running locally.

以下说明用于在本地启动和运行 。

1.首先克隆此Github存储库并cd进入其目录。 (1. Start by cloning this Github repository and cd into its directory.)

$ git clone https://github.com/scottmotte/sendgrid-parse-api-example.git$ cd sendgrid-parse-api-example

2.设置您的凭据。 (2. Set up your credentials.)

$ mv .env.example .env

3.将.env的内容更改为您的SendGrid用户名和密码。 (3. Change the contents of .env to your SendGrid username and password.)

SENDGRID_USERNAME = your_sendgrid_usernameSENDGRID_PASSWORD = your_sendgrid_password

4.运行该应用程序。 (4. Run the app. )

$ npm install$ node app.js

If npm install doesn't work for you, you can try installing through :

如果npm install不适用于您,则可以尝试通过安装:

$ sudo port npm install

If you are receiving errors that indicate a missing module, this means that you should install it.  For example, installing dotenv resolves the installation issue of app.js not being able to instantiate the dotenv variable.

如果收到指示缺少模块的错误,则意味着您应该安装它。 例如,安装dotenv可解决app.js无法实例化dotenv变量的安装问题。

$ npm install dotenv

5.使用类的本地隧道在本地进行快速测试-而不是将代码部署到实时服务器中。 (5. Use a local tunnel like to test locally and quickly - rather than deploying code to a live server. )

Ngrok allows you to securely expose a local web server to the web and capture traffic for detailed inspection and replay.

Ngrok允许您安全地将本地Web服务器公开到Web并捕获流量以进行详细检查和重放。

Download, unzip, and start the ngrok process. After you start the process, ngrok will give you a unique URL for you to inspect locally on.

下载,解压缩并启动ngrok进程。 启动该过程后,ngrok将为您提供一个唯一的URL,供您在本地进行检查。

The instructions below are for getting ngrok to work locally on a Mac. Click to install a local setup for other operating systems.

以下说明用于使ngrok在Mac上本地工作。 单击为其他操作系统安装本地设置。

$ wget https://dl.ngrok.com/darwin_amd64/ngrok.zip$ unzip ngrok.zip -d /usr/local/bin$ ngrok 3000

6.设置SendGrid和MX记录。 最多可能需要48个小时。 (6. Set up SendGrid and MX Records. It can take up to 48 hours. )

Here is how you can get up and running as soon as possible. Once your MX records have fully propagated, you can send emails on production in up to 48 hours.

这是您如何尽快启动并运行的方法。 MX记录完全传播后,您最多可以在48小时内发送生产中的电子邮件。

First, you can set up your (you must have a provisioned SendGrid account to access this link). Click on the "Developers" tab for the "Parsing Incoming Emails" link. In the Hostname field, specify your hostname (i.e. yourdomain.com) that you would like. In the Url field, input the unique URL that ngrok provided you.

首先,您可以设置您的 (您必须具有预配置的SendGrid帐户才能访问此链接)。 单击“开发人员”选项卡上的“解析传入电子邮件”链接。 在主机名字段中,指定您的 您想要的主机名(即yourdomain.com)。 在网址字段中,输入ngrok为您提供的唯一URL。

Please configure an MX record on the hostname you set above to point to mx.sendgrid.net. It should look something like the following.

请在上面设置的主机名上配置MX记录,使其指向mx.sendgrid.net。 它看起来应该如下所示。

Within 2 days, your MX records will completely propagate.

在2天内,您的MX记录将完全传播。

7.从您的个人电子邮件帐户发送电子邮件。 (7.  Send an email from your personal email account. )

If you send an email to , in a few minutes, the app you have running will parse and deliver the contents to you in JSON format.

如果您发送电子邮件至 , 几分钟后,您正在运行的应用程序将解析并以JSON格式将内容传递给您。

8.测试并使用API​​。 (8. Test and play with the API. )

Congratulations, you have set up a simple way to parse your emails efficiently!

恭喜,您已经设置了一种简单的方法来高效地解析电子邮件!

Now, you are ready to explore and make calls to the API.

现在,您准备好探索和调用API。

检查有效载荷内容: (Inspecting the payload contents:)

If you just need a quick way to inspect the payload contents of the Parse Webhook, you can use , a free tool, after setting up your MX records.

如果您只需要一种快速的方法来检查Parse Webhook的有效内容,则可以在设置MX记录之后使用免费工具 。

从命令行发布: (Posting from the command line:)

If you'd like to get your hands dirty from the command line, you can try SendGrid's free , which is a fast way to start seeing how events appear.

如果您想从命令行弄脏手,可以尝试使用SendGrid的免费 ,这是一种开始查看事件如何出现的快速方法。

At the heart of the tool is a URL that you can set as your Parse Webhook endpoint. Each time you load the URL, you will get a unique ID within the URL.

该工具的核心是一个URL,您可以将其设置为Parse Webhook端点。 每次加载URL时,您都会在URL中获得唯一的ID。

Below are two examples to get started with your webhook. The GET example will begin listening for new data.

以下是两个开始使用Webhook的示例。 GET示例将开始侦听新数据。

From your command-line terminal, paste in the following GET example:

在命令行终端,粘贴以下GET示例:

$ curl -X GET \ http://hookdebug.sendgrid.com/v1/events/e6a20fffc9c1968dd64684f0b11b9c29

To paste in whether your Parse Webhook is receiving data, type in the curl command from the POST example into a second terminal screen:

要粘贴您的Parse Webhook是否正在接收数据,请在POST示例中键入curl命令到第二个终端屏幕:

$ curl -X POST \  -d "foo=bar" \  -d "alice=bob" \  http://hookdebug.sendgrid.com/v1/events/e6a20fffc9c1968dd64684f0b11b9c29

The response on your terminal window should now have new content:

终端窗口上的响应现在应该具有新内容:

{	"event_id": "e6a20fffc9c1968dd64684f0b11b9c29"}

Next, send an email to the domain or sub-domain that you are using for inbound parsing. Within a few minutes, you should see the parsed email as JSON in your terminal window.

接下来,将电子邮件发送到您用于入站解析的域或子域。 几分钟后,您应该在终端窗口中将解析后的电子邮件作为JSON看到。

9.自定义解析器。 (9. Customize your parser.)

As you can see, the details of email data separation and routing an incoming message to the SendGrid script are done behind the scenes for you. Starting with a blank slate, you can use the Parse Webhook creatively, however you wish.

如您所见,电子邮件数据分离和将传入消息路由到SendGrid脚本的详细信息已在后台完成。 从空白开始,您可以随意使用Parse Webhook。

Now you're ready to place some real email data through that webhook! The instructions below are for getting the up and running locally on a Mac. Click to install a local setup for other operating systems.

现在,您可以通过该Webhook放置一些真实的电子邮件数据了! 以下说明用于在Mac上启动并在本地运行。 单击为其他操作系统安装本地设置。

To customize how you'd like to parse your emails, you can start to customize the code in . 

要自定义解析电子邮件的方式,您可以开始自定义的代码。

For example, you can rewrite the file to complete an action if the email contents contain a word, or even store attachments in a way that would suit your application and database.

例如,如果电子邮件内容包含单词,则可以重写文件以完成操作,甚至可以以适合您的应用程序和数据库的方式存储附件。

For use cases, case studies and examples, please or check out the . When looking at the Parse Webhook examples, you will notice that the two most common ways it is used are: interacting with your users and collecting data within your applications via email.  With the webhook, you can develop features that make frequent tasks more productive for your users without having them leave their email inbox.  Collecting insights and making your emails interactive have never been easier.

有关用例,案例研究和示例,请或查看 。 查看Parse Webhook示例时,您会注意到使用它的两种最常见的方式是:与用户进行交互以及通过电子邮件在应用程序内收集数据。 借助webhook,您可以开发一些功能,使用户无需离开电子邮件收件箱即可使日常任务更加高效。 收集见解并使您的电子邮件具有交互性从未如此简单。

翻译自:

web电子邮件客户端插件

转载地址:http://repwd.baihongyu.com/

你可能感兴趣的文章
uclibc,eglibc,glibc之间的区别和联系【转】
查看>>
Java魔法堂:找外援的利器——Runtime.exec详解
查看>>
mysql数据库存放路径
查看>>
TestNG(五)常用元素的操作
查看>>
解决 Visual Studio 点击添加引用无反应的问题
查看>>
通过镜像下载Android系统源码
查看>>
python字符串格式化 %操作符 {}操作符---总结
查看>>
windows 不能在 本地计算机 启动 Apache
查看>>
iOS开发报duplicate symbols for architecture x86_64错误的问题
查看>>
Chap-6 6.4.2 堆和栈
查看>>
【Java学习笔记之九】java二维数组及其多维数组的内存应用拓展延伸
查看>>
C# MySql 连接
查看>>
sk_buff Structure
查看>>
oracle的级联更新、删除
查看>>
多浏览器开发需要注意的问题之一
查看>>
Maven配置
查看>>
HttpServletRequest /HttpServletResponse
查看>>
SAM4E单片机之旅——24、使用DSP库求向量数量积
查看>>
从远程库克隆库
查看>>
codeforces Unusual Product
查看>>