简体   繁体   English

使用Amazon SES的简单Web服务

[英]Simple web service using Amazon SES

I would like to use AWS and especially Amazon Simple Email Service (SES) in order to setup a webservice allowing to send emails. 我想使用AWS尤其是Amazon Simple Email Service(SES)来设置允许发送电子邮件的Web服务。

Emails would be triggered by some kind of POST request to the webservice with some authentication, and the webservice would then just send the email on behalf of the web service user. 电子邮件将通过某种带有某种身份验证的POST请求触发到Web服务,然后Web服务将仅代表Web服务用户发送电子邮件。

Where should I start? 我应该从哪里开始? The webservice part looks dead simple but I'm not familiar at all with web services. Web服务部分看起来非常简单,但是我对Web服务一点都不熟悉。 I still need to run some kind of multithreaded webserver since there could be a bunch of concurrent requests. 我仍然需要运行某种多线程Web服务器,因为可能会有很多并发请求。

Is there a way for me to write a very simple web server in Ruby or Java to do that? 有没有办法用Ruby或Java编写一个非常简单的Web服务器来做到这一点? Any pointer appreciated. 任何指针表示赞赏。

After some digging, the simplest solution is to use something like node.js or sinatra. 经过一番挖掘之后,最简单的解决方案是使用诸如node.js或sinatra之类的东西。 The nice thing is that these are almost self-contained and require barely any configuration. 令人高兴的是,这些几乎是独立的,几乎不需要任何配置。 They provide a very easy way to reply to HTTP requests. 它们提供了一种非常简单的方式来回复HTTP请求。

Once you get one of these, you start the script with a port. 一旦获得其中之一,就可以使用端口启动脚本。

The small webservice will now listen on that port. 小型Web服务现在将在该端口上侦听。 You only need to take action based on the requests passed as parameter. 您仅需要根据作为参数传递的请求采取措施。

And yeah, now it sounds so obvious... 是的,现在听起来很明显...

their documentation is good way to start. 他们的文档是入门的好方法。 its quite easy to start, may encounter difficulties based on your problem domains. 它非常容易上手,根据您的问题领域可能会遇到困难。 you also need to implement something on top of this service. 您还需要在此服务之上实现一些功能。

http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/index.html http://docs.amazonwebservices.com/ses/latest/APIReference/ http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/ http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/index.html http://docs.amazonwebservices.com/ses/latest/APIReference/ http://docs.amazonwebservices.com/ses/latest/DeveloperGuide /

Good Luck! 祝好运!

I would start with looking at AWS sdk Java. 我将从查看AWS sdk Java开始。 They seem to support SES. 他们似乎支持SES。 http://docs.amazonwebservices.com/AWSJavaSDK/latest/javadoc/index.html http://docs.amazonwebservices.com/AWSJavaSDK/latest/javadoc/index.html

Good Luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM