接收电子邮件网站的最佳方式

发布于 2024-10-26 11:30:53 字数 912 浏览 6 评论 0原文

我正在开发一个网站——处于原型阶段,很快就会成为阿尔法阶段。我将为每个帐户提供一个电子邮件地址,允许用户存入东西——不是真正的电子邮件帐户,只是将东西发送到网站的端点。现在很多网站都提供这种服务。我想我看到的第一个是 Photobucket,它可以让你将照片作为电子邮件附件发送。

我的问题是,实施这种服务的最佳方式是什么?

在我的原型中,我编写了一个 POP3 客户端,用于获取所有新发送的邮件(当前来自测试 Gmail 帐户)。我的服务处理每封新邮件和附件,并立即将其从电子邮件服务器中删除。

我当然可以将 POP3 外包给电子邮件服务并完成它。问题是成本。我见过的大多数服务提供的服务远远超出了我的需要,而且它们按帐户收费。我希望有很多帐户和低流量。

所以我倾向于自己托管电子邮件收据。我对 Windows 或 Linux 持开放态度。处理传入电子邮件的代码在 Windows 上运行,但我还有其他服务在 Linux 上运行。我见过许多开源和免费的电子邮件服务器,例如 hMailServer 和 MailEnable (Windows) 以及 qmail、Postfix 和 exim (Linux)。

我想我对 Linux 有一点偏好,因为它的托管成本较低,但如果 Windows 服务可以提供更清晰的集成,那可能是值得的。就功能而言,我希望有一些垃圾邮件过滤功能,但这并不是一个重要的优先事项。 POP3 足以进行检索,但更直接的 API 会更好。我需要某种 API 来以编程方式配置新帐户。

感谢所有建议。你知道其他人是如何实现这种服务的吗?

更新:我最终使用了hMailServer,这是一个运行在视窗。看起来已经相当成熟和稳健了。它有一个 COM 互操作库,这使得从我的 .NET 服务器应用程序访问电子邮件、帐户等确实非常容易。

I am developing a website -- in the prototype stage, soon to be alpha. I will provide an email address to each account that allows the user to deposit stuff -- not a real email account, just an endpoint for sending things to the site. Many sites provide this kind of service nowadays. I think the first one I saw was Photobucket, which let's you send photos as email attachments.

My question is, what is the best way to implement this kind of service?

In my prototype, I have written a POP3 client which fetches all newly delivered mail (currently from a test Gmail account). My service processes each new mail and attachments, and immediately removes it from the email server.

I could certainly outsource to an email service with POP3 and be done with it. The problem is cost. Most services I have seen provide much more than I need, and they charge per account. I expect to have many accounts and low traffic volume.

So I'm leaning towards hosting email receipt myself. I am open to Windows or Linux. The code that processes incoming emails runs on Windows, but I have other services running on Linux. I have seen a number of open source and free email servers, such as hMailServer and MailEnable (Windows) and qmail, Postfix and exim (Linux).

I guess I have a slight preference towards Linux because of lower hosting costs, but if a Windows service can provide cleaner integration, that might be worth it. As far as features, I would like to have some spam filtering, but it's is not a huge priority. POP3 is adequate for retrieval, but a more direct API would be nice. I will need some kind of API for programmatically provisioning new accounts.

All suggestions are appreciated. Do you know how others implement this kind of service?

UPDATE: I ended up using hMailServer, which is a free mail server that runs on Windows. It seems to be quite mature and robust. It has a COM interop library which makes accessing emails, accounts, etc. from my .NET server app very easy indeed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

远山浅 2024-11-02 11:30:53

如果您要采用托管您自己的电子邮件服务器的方式,我可能会使用 POSTFIX 并将所有电子邮件通过管道传输到 PHP 脚本,该脚本会处理电子邮件。

如果您使用 cPanel,这里有一个关于设置电子邮件管道的快速教程:

http:// /kb.siteground.com/article/How_to_pipe_an_email_to_a_PHP_script.html

如果没有,请按以下步骤操作:

http://answers.google.com/answers/threadview?id=562518

If you're going the host-your-own-email-server route, I would probably just use POSTFIX and pipe all your email to a PHP script, which processes the email.

Here's a quick'n dirty tutorial on setting up the email pipe if you're using cPanel:

http://kb.siteground.com/article/How_to_pipe_an_email_to_a_PHP_script.html

If not, here's how to do it:

http://answers.google.com/answers/threadview?id=562518

此生挚爱伱 2024-11-02 11:30:53

最重要的是,您需要有一个开放的 SMTP 连接才能接受电子邮件。如果您有自己的服务器,则可以在计算机上安装 SMTP 服务器。通常,您可以通过文件系统访问电子邮件文件所在的位置。请务必选择允许此操作的 SMTP 服务器,并且电子邮件采用您可以解析的格式。

然后,您可以监控传入电子邮件的文件位置。

如果您无法通过管道发送电子邮件(使用 Postfix 建议),并且没有自己的服务器(例如,在共享托管计划上),那么您将需要向 POP3 或 IMAP 邮箱服务器查询您的电子邮件,并相应地解析它们。

The bottom line is, you need to have an open SMTP connection to accept email. If you have your own server, then you can install a SMTP server on the machine. Usually, you have filesystem access to the location the email files are placed. Be sure to select a SMTP server that allows this, and that the email are in a format that you can parse.

Then, you can just monitor the file location for incoming emails.

If you can't pipe your emails (using the Postfix suggestion), and you don't have your own server (for example, on a shared hosting plan), then you will need to query a POP3 or IMAP mailbox server for your emails, and parse them accordingly.

极度宠爱 2024-11-02 11:30:53

我想实时接收电子邮件,所以我使用谷歌应用程序引擎制定了自己的解决方案。我基本上制作了一个小型专用谷歌应用程序引擎应用程序来接收电子邮件并将其发布到我的主网站。这样我就可以避免设置电子邮件服务器。

您可以查看电子邮件化(我为您做的一个周末小项目),或者您这个小型 GAE 应用 应该可以解决这个问题。

我在另一个问题上对此进行了更多解释。

希望有帮助!

I wanted to get emails in real time so I worked out my own solution with google app engine. I basically made a small dedicated google app engine app to receive and POST emails to my main site. That way I could avoid having to set up an email server.

You can check out Emailization (a little weekend project I did to do it for you), or you this small GAE app that should do the trick.

I kinda explained it more on another question.

Hope that helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文