如何从服务器发送电子邮件与Android? [英] How to send e-mail from server with Android?

查看:151
本文介绍了如何从服务器发送电子邮件与Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑我,我在服务器端编程新。

Consider me,I am new in server side programming.

假如,我在我的服务器(比如姓名,E-mail标识等),一些注册用户的信息。我想将数据从我的 Android版设备发送到服务器。然后,我希望将电子邮件发送到共同响应用户提供格式化的数据。就像一个通知邮件,当我们从网站得到的,注册之后。
我已经完成了第一部分,意味着我可以做一个 HTTP 要求从设备的PHP文件。

Suppose, I have a number of registered user information in my server (like Name, E-Mail Id etc). I want to send data to server from my Android device. Then I want to send an E-Mail to the the co-responding user with formatting the data . Just Like a Notification mail, When we got from a website, after a registration. I already done first part, mean I can make a HTTP request to a PHP file from device.

我如何达到我的目标?我在本地服务器在我的笔记本电脑现在的工作。我能做到这一点本地服务器或需要一个真正的Web-服务器

How I reach my goal? I am working in Local Server in my laptop now. Can I achieve this local server or need a Real Web-Server?

有人可以给我一个解决方案。关于这个话题的任何教程,文档链接将大大AP preciated。

Somebody can give me a solution. Any tutorial, documentation link about this topic would greatly appreciated.

推荐答案

创建HTTP连接后,你必须从器件地址传递所需的数据到服务器一样,为解决等。
要通过这些数据,您可以使用 JSON解析或< A HREF =htt​​p://www.androidhive.info/2011/11/android-xml-parsing-tutorial/相对=nofollow> XML解析。
我建议你​​使用JSON解析。

After creating http connection you have to pass required data from device to server like from address , to address etc.. To pass the data you can use either JSON Parsing or XML parsing. I recommend you to use JSON Parsing.

然后在服务器端,您可以使用发送邮件从PHP 功能发送邮件给任何人。

And then on the server side you can use Send Mail functionality from PHP to send mails to anybody.

和是的,有从本地服务器发送邮件的方式。请参阅此职位。

And yes there is a way to send mails from local server. See this post.

这篇关于如何从服务器发送电子邮件与Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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