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

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

问题描述

考虑我,我是服务器端编程的新功能。



假设我的服务器中有一些注册的用户信息(如名称,电子邮件ID等)。我想从我的 Android 设备向服务器发送数据。然后我想通过格式化数据向电子邮件发送电子邮件。就像一个通知邮件,当我们从一个网站,注册后。
我已经做了第一部分,这意味着我可以从设备向一个PHP文件发送一个 HTTP 请求。



我如何达到我的目标?我现在在笔记本电脑中的本地服务器中工作。我可以实现这个本地服务器还是需要一个真实Web服务器



有人可以给我一个解决方案。

解决方案

创建http连接后,您必须将所需的数据从设备传递到服务器从地址到地址等。
要传递数据,您可以使用 JSON解析 XML解析
我建议您使用JSON解析。



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



是的,有一种从本地服务器发送邮件的方式。请参阅此帖子


Consider me,I am new in server side programming.

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.

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?

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

解决方案

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.

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天全站免登陆