从电子邮件到共享托管后端再到远程前端

发布于 2024-11-04 08:46:15 字数 553 浏览 8 评论 0原文

因此,我的朋友每隔一段时间就会举办一次小型聚会,但空间仅限于前 14 名回复的人。他通过电子邮件将邀请发送到一个列表,然后接受第一批回复的人。今晚我勉强进去了,因为我不能总是检查我的电子邮件,所以我告诉他我会编写一个程序来立即响应他的​​请求。这通常不会成为问题(自动回复,简单),除非他最近创建了一个在线注册表单。我认为他发出下一个邀请并得到我不到 100 毫秒的响应会很有趣,所以我想尝试一下。

问题是,我不太确定如何在不花费太多费用的情况下实现这一目标。我有一个可以托管一些 .NET 后端代码的个人网站,但它位于共享的 GoDaddy 服务器上,因此我实际上没有对邮件服务器或其他任何内容的大量访问权限。我在想,如果我能收到一封发送到某个地址的电子邮件,也许它可以触发一个网络请求,可以拉下他的页面,然后填写(非常简单,比如 2 或 3 个输入)表单并提交,但再次,我不太确定如何。

有人知道我该怎么做吗?我希望这种情况能够自动发生,不需要我进行任何形式的交互,基本上只要我从某个电子邮件地址收到电子邮件,我的代码就会被触发,表格会被填写并提交。

这只是为了好玩,但作为程序员的我很好奇如何才能真正让它发挥作用。

谢谢!

So my friend hosts a little get together every once in a while where space is limited to the first 14 people who RSVP. He emails the invite out to a list and then accepts the first people who respond. Tonight I barely got in because I can't always check my email, so I told him that I would write a program that would respond instantly to his request. This would not normally be a problem (autoresponder, easy) except he has recently created an online signup form. I think it would be funny for him to send out his next invite and get a sub-100ms response from me, so I would like to give this a try.

The problem is, I'm not quite sure how to go about it without going to to much expense. I have a personal site that can host some .NET backend code, but it's on a shared GoDaddy server so I don't really have a ton of access to the mailserver or anything. I was thinking that if I could get an email sent to a certain address that maybe it could trigger a webrequest that could pull down his page and then fill the (very simple, like 2 or 3 inputs) form out and submit it, but again, I'm not quite sure how.

Would anyone have an idea about how I could go about this? I would want for this to happen automatically without any sort of interaction from me, just basically as soon as I get an email from a certain email address, somehow my code is triggered and the form filled out and submitted.

This is just for fun, but the programmer in me is curious as to how I could actually get this to work.

Thanks!

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

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

发布评论

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

评论(1

过期情话 2024-11-11 08:46:15

据我所知,最实惠的方法是通过 NearlyFreeSpeech.NET。如果您在那里设置了帐户,则可以配置具有电子邮件转发功能的域,费用为 3 美分/天。他们可以选择将电子邮件转发到脚本,因此您可以编写一些内容来查看邮件、下拉表单并发布到服务器。

我不确定,但我认为脚本必须在他们的服务器上运行,因此您必须建立一个网站(每天另外几美分)并编写脚本以在 UNIX 环境(PHP 或 Perl 或这样的)。如果您坚持使用 .NET,您可以编写一个最小的 PHP 脚本将数据转发到您的 GoDaddy 帐户。

The most affordable thing I know of would be through NearlyFreeSpeech.NET. If you set up an account there, you can configure a domain with email forwarding for 3 cents/day. They have an option to forward the email to a script, so you could write something that would look at the mail, pull down the form, and post to a server.

I'm not sure but I think the script has to be running on their servers, so you'll have to set up a website (another few cents per day) and write the script to run in a UNIX environment (PHP or Perl or such). If you insist on .NET, you could write a minimal PHP script to forward the data to your GoDaddy account.

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