0

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.

Shihab Uddin
  • 6,699
  • 2
  • 59
  • 74

2 Answers2

1

You can send emails with PHP if you can connect to an outgoing mail server. Most hosting solutions will come with this by default (although most of them will have restrictions). I'd recommend using SwiftMailer. You can send emails via your Gmail account if you're looking to run a few tests.

Community
  • 1
  • 1
Wayne Whitty
  • 19,513
  • 7
  • 44
  • 66
  • wao..thanks for reply.can I integrate SwiftMailer in local server or real one? I have no real server now. Can I format the mail with data which would be sent from server to user email? – Shihab Uddin Oct 26 '13 at 18:28
1

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.

Community
  • 1
  • 1
Karan Nagpal
  • 521
  • 1
  • 8
  • 19