An open API service indexing awesome lists of open source software.

https://github.com/sendgrid/oracle-java-sample-app


https://github.com/sendgrid/oracle-java-sample-app

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

          

Oracle Sample App - Java
======================

This git repository helps you to send emails quickly and easily through SendGrid using Java.

Create an SendGrid account at http://sendgrid.com/pricing.html

Clone SendGrid application on your local machine


git clone --recursive https://github.com/sendgrid/oracle-java-sample-app

###Configuration###

Configure `sendgrid-java-sample-app/src/com/sendgrid/SendGridJavaSampleApplicationSendServlet.java` file with your information:

Update the *<sendgrid_username>* and *<sendgrid_password>* with your SendGrid Credentials and *<from_email>* with your email address.
```java
// initialize Sendgrid class
// please replace "" and "" with your SendGrid credentials
SendGrid mail = new SendGrid("","");
// set to address, from address, subject, the html/text content and send the email
String response = mail.addTo(req.getParameter("emailto"))
// update the with your email address
.setFrom("")
.setSubject(req.getParameter("subject"))
.setText(req.getParameter("content"))
.setHtml("")
.send();
```

Build your application and deploy to your webserver.

For more information you can visit our [Java Library](https://github.com/sendgrid/sendgrid-java)