是否有可能以编程方式发送电子邮件,而无需使用任何实际的电子邮件帐户 [英] Is it possible to send an email programmatically without using any actual email account

查看:359
本文介绍了是否有可能以编程方式发送电子邮件,而无需使用任何实际的电子邮件帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现报告错误/建议选项,我的比赛,但是我不太清楚,我怎么能得到那个工作。我没有自己的服务器或任何东西,所以我不能只是给用户写在那里的文字。

I'm thinking of implementing "Report a bug/Suggestions" option to my game, however I am not quite sure how I could get that working. I do not have my own server or anything, so I can't just send the text that user has written to there.

我想出的唯一办法是,客户端会写留言,我会它发送到电子邮件帐户,我能读懂他们。不过,我不希望用户将需要通过他们的个人账户来发送报告。我不太清楚,我怎么能实现这一点,谷歌搜索并没有带来了什么好的建议。

The only way I came up with is that the client would write a message and I would send it to an email account where I could read them. However, I do not want that users would need to send the reports through their personal accounts. I am not quite sure how I could implement this and googling didn't bring up any good suggestions.

我没有做了很多网络的东西,所以我真的AP preciate它,如果你能解释(甚至可能在code)的过程中一步一步。

I haven't done a lot of network stuff, so I'd really appreciate it if you could explain ( possibly even in code ) the process step-by-step.

我使用C#和游戏被编程为Windows Phone 7。

I am using C# and the game is being programmed for Windows Phone 7.

推荐答案

是的,这是绝对有可能做到这一点。从一个比较低层次的角度来看,你需要:

Yes, it is absolutely possible to do that. From a relatively low-level perspective, you need to:

  1. 解析的MX(邮件交换器)服务器,你要发送到的电子邮件帐户。
  2. 打开一个套接字到MX服务器。
  3. 发送相应的 SMTP命令导致电子邮件被传递到收件人的帐户。你基本上可以自由地发件人地址设置为你想要的任意东西。
  1. Resolve the MX (mail-exchanger) server for the e-mail account you want to send to.
  2. Open a socket to the MX server.
  3. Send the appropriate SMTP commands to cause the e-mail message to be delivered to your recipient account. You essentially have the freedom to set the "from" address to be any arbitrary thing you want.

SMTP是一个非常简单/人性化的协议,所以它不是一个巨大的努力,做手工了这一切。同时,也有一些 prebuilt库的将要处理所有这一切为你(除了收件人的MX服务器的可能的分辨率)。

SMTP is a very simple/human-friendly protocol, so it's not a massive effort to do all of that by hand. At the same time, there are a number of prebuilt libraries that will handle all of that for you (except possibly the resolution of the recipient's MX server).

请注意发送这样的邮件更容易被过滤掉垃圾邮件(通常是因为发件人的IP /主机名是不会匹配任何域你把你决定使用传出的电子邮件地址)。

Note that emails sent this way are more likely to be filtered out as spam (generally because the sender's IP/hostname is not going to match whatever domain you put on the outgoing e-mail address you decide to use).

另外请注意,因为你可以发件人地址设置到任何东西,你必须询问用户是否要提供自己的实际联系地址的选项,如果他们这样做,你就可以说:从地址,实际上你可以回去跟他们在必要时联系。

Also note that since you can set the "from" address to anything, you have the option of asking the user if they want to provide their actual contact address, and if they do you can make that the "from" address so that you can actually get back in touch with them if necessary.

这篇关于是否有可能以编程方式发送电子邮件,而无需使用任何实际的电子邮件帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆