0

I am working on a web based Java application(on localhost) and I want to send email using a PHP script which is hosted on a free web hosting site and also return to my java app.

Like this ->

Java(localhost)---->PHP(send mail)---->Java(localhost) 

Few questions regarding this?

  • How to do this?

  • What about the session stored by the java app? Will the PHP script read or interpret java's session?

Vinay Jain
  • 1,653
  • 20
  • 28
  • This migh be helpful :http://stackoverflow.com/questions/2615789/how-to-share-session-between-php-app-and-java-ee-app – Suresh Atta Sep 28 '13 at 13:55

1 Answers1

1

My suggestion is Implement an web service (in REST or SOAP Architecture) with php

then in java code call your web service and Implement an acknowledgement response for

successful or failure mail sending operation in your php!

SOA (Service Oriented Architecture) could be one of best approach for communication between

different platforms.

if you use php only because of ease of sending mail it would be fine to know that java also

have JavaMail API that can be used for mailing application very easily

I hope it be beneficial

Regards

Saeed Alizadeh
  • 1,417
  • 13
  • 23