https://github.com/sendgrid/oracle-java-sample-app
https://github.com/sendgrid/oracle-java-sample-app
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/sendgrid/oracle-java-sample-app
- Owner: sendgrid
- Created: 2014-02-14T09:53:11.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2016-02-20T01:01:22.000Z (about 10 years ago)
- Last Synced: 2025-09-05T16:46:17.982Z (7 months ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 190
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)