Skip to content

Commit

Permalink
Email Functionality Added
Browse files Browse the repository at this point in the history
  • Loading branch information
tanvir10029 committed May 12, 2021
1 parent 9c2c74c commit ff686ba
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 0 deletions.
1 change: 1 addition & 0 deletions Expedia/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JavaFX"/>
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JavaMail"/>
<classpathentry kind="output" path="bin"/>
</classpath>
21 changes: 21 additions & 0 deletions Expedia/src/application/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.*;
import com.email.durgesh.Email;



Expand Down Expand Up @@ -340,6 +341,26 @@ else if(CardF.getText().isEmpty()) {
su.sendMessage(msg);
rs = su.recvMessage();

System.out.println("Sending email to " + emailF.getText());

try{
Email email = new Email("[email protected]", "JavaFx@67");
email.setFrom("[email protected]", "Expedia SE Project");
email.setSubject("Test");
email.setContent("<h1>Thank You For Your Expedia Purchase!</h1>"
+ "<p>"
+ "Starting Location: "+ startLocTF.getValue()
+ "<br>" + "Ending Location: "+ endLocTF.getValue()
+ "<br>" + "Email: " + emailF.getText()
+ "<br> Card #: "+ CardF.getText()
+ "</p>", "text/html");
email.addRecipient(emailF.getText());
email.send();
}
catch (Exception e) {
e.printStackTrace();
}


//
// close the socket connection
Expand Down
78 changes: 78 additions & 0 deletions Expedia/transactionLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,81 @@
05-12-2021 14.01.38 : SERVER : Email: eeff
05-12-2021 14.01.39 : SERVER : Card #: dwa
05-12-2021 14.01.40 : SERVER : quit
05-12-2021 14.47.07 : SERVER : Transaction>kiosk#001,0,0.00
05-12-2021 14.47.07 : SERVER : Name: kjhg
05-12-2021 14.47.08 : SERVER : Starting Location: New York City
05-12-2021 14.47.08 : SERVER : Ending Location: Los Angeles
05-12-2021 14.47.09 : SERVER : Email: njbhv
05-12-2021 14.47.09 : SERVER : Card #: jnhg
05-12-2021 14.47.10 : SERVER : quit
05-12-2021 14.51.19 : SERVER : Transaction>kiosk#001,0,0.00
05-12-2021 14.51.20 : SERVER : Name: kjhg
05-12-2021 14.51.20 : SERVER : Starting Location: New York City
05-12-2021 14.51.21 : SERVER : Ending Location: Los Angeles
05-12-2021 14.51.21 : SERVER : Email: njbhv
05-12-2021 14.51.22 : SERVER : Card #: jnhg
05-12-2021 14.51.22 : SERVER : quit
05-12-2021 15.09.27 : SERVER : Transaction>kiosk#001,0,0.00
05-12-2021 15.09.28 : SERVER : Name: sc
05-12-2021 15.09.29 : SERVER : Starting Location: Miami
05-12-2021 15.09.29 : SERVER : Ending Location: Los Angeles
05-12-2021 15.09.29 : CLIENT : Transaction>kiosk#001,0,0.00
05-12-2021 15.09.30 : SERVER : Email: sc
05-12-2021 15.09.30 : SERVER : Card #: sc
05-12-2021 15.09.31 : SERVER : quit
05-12-2021 15.11.23 : SERVER : Transaction>kiosk#001,0,0.00
05-12-2021 15.11.24 : SERVER : Name: ef
05-12-2021 15.11.24 : SERVER : Starting Location: Miami
05-12-2021 15.11.25 : SERVER : Ending Location: Los Angeles
05-12-2021 15.11.25 : CLIENT : Transaction>kiosk#001,0,0.00
05-12-2021 15.11.25 : SERVER : Email: f
05-12-2021 15.11.26 : SERVER : Card #: f
05-12-2021 15.11.26 : SERVER : quit
05-12-2021 15.16.12 : SERVER : Transaction>kiosk#001,0,0.00
05-12-2021 15.16.13 : SERVER : Name: Yoo
05-12-2021 15.16.13 : SERVER : Starting Location: New York City
05-12-2021 15.16.13 : CLIENT : Transaction>kiosk#001,0,0.00
05-12-2021 15.16.14 : SERVER : Ending Location: Los Angeles
05-12-2021 15.16.14 : SERVER : Email: Yooooo
05-12-2021 15.16.15 : SERVER : Card #: [email protected]
05-12-2021 15.16.15 : SERVER : quit
05-12-2021 15.16.47 : SERVER : Transaction>kiosk#001,0,0.00
05-12-2021 15.16.48 : SERVER : Name: Yoo
05-12-2021 15.16.48 : SERVER : Starting Location: New York City
05-12-2021 15.16.48 : CLIENT : Transaction>kiosk#001,0,0.00
05-12-2021 15.16.49 : SERVER : Ending Location: Los Angeles
05-12-2021 15.16.49 : SERVER : Email: Yooooo
05-12-2021 15.16.50 : SERVER : Card #: [email protected]
05-12-2021 15.16.50 : SERVER : quit
05-12-2021 15.20.04 : SERVER : Transaction>kiosk#001,0,0.00
05-12-2021 15.20.05 : SERVER : Name: Tan
05-12-2021 15.20.05 : SERVER : Starting Location: New York City
05-12-2021 15.20.06 : SERVER : Ending Location: Tokyo
05-12-2021 15.20.06 : CLIENT : Transaction>kiosk#001,0,0.00
05-12-2021 15.20.06 : SERVER : Email: [email protected]
05-12-2021 15.20.07 : SERVER : Card #: sd
05-12-2021 15.20.07 : SERVER : quit
05-12-2021 15.22.43 : SERVER : Transaction>kiosk#001,0,0.00
05-12-2021 15.22.43 : SERVER : Name: GH
05-12-2021 15.22.44 : SERVER : Starting Location: New York City
05-12-2021 15.22.44 : CLIENT : Transaction>kiosk#001,0,0.00
05-12-2021 15.22.44 : SERVER : Ending Location: Los Angeles
05-12-2021 15.22.45 : SERVER : Email: [email protected]
05-12-2021 15.22.45 : SERVER : Card #: x
05-12-2021 15.22.46 : SERVER : quit
05-12-2021 15.25.19 : SERVER : Transaction>kiosk#001,0,0.00
05-12-2021 15.25.20 : SERVER : Name: Bob
05-12-2021 15.25.20 : SERVER : Starting Location: Tube Land
05-12-2021 15.25.21 : CLIENT : Transaction>kiosk#001,0,0.00
05-12-2021 15.25.21 : SERVER : Ending Location: Yahooo World
05-12-2021 15.25.21 : SERVER : Email: [email protected]
05-12-2021 15.25.22 : SERVER : Card #: 1234
05-12-2021 15.25.22 : SERVER : quit
05-12-2021 15.27.00 : SERVER : Transaction>kiosk#001,0,0.00
05-12-2021 15.27.01 : SERVER : Name: HI
05-12-2021 15.27.01 : SERVER : Starting Location: Tokyo
05-12-2021 15.27.02 : SERVER : Ending Location: Los Angeles
05-12-2021 15.27.02 : CLIENT : Transaction>kiosk#001,0,0.00
05-12-2021 15.27.02 : SERVER : Email: [email protected]
05-12-2021 15.27.03 : SERVER : Card #: 33333
05-12-2021 15.27.03 : SERVER : quit

0 comments on commit ff686ba

Please sign in to comment.