Skip to content

Commit 86e42e6

Browse files
author
Matt Bernier
authored
Merge branch 'master' into master
2 parents 8000a36 + 009fed1 commit 86e42e6

File tree

10 files changed

+599
-1869
lines changed

10 files changed

+599
-1869
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ matrix:
1010
jdk: oraclejdk7
1111
- os: linux
1212
jdk: oraclejdk8
13+
before_script:
14+
- "./scripts/startPrism.sh &"
15+
- sleep 10
16+
before_install:
17+
- cat /etc/hosts # optionally check the content *before*
18+
- sudo hostname "$(hostname | cut -c1-63)"
19+
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
20+
- cat /etc/hosts # optionally check the content *after*
1321
after_script:
22+
- lsof -i :4010 -S # adds some debugging statements
1423
- "./gradlew build"
1524
- "./scripts/upload.sh"
1625
env:

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ All notable changes to this project will be documented in this file.
2020
### BREAKING CHANGE
2121
- PR #162 Update java http client dependency to [4.1.0 from 2.3.4](https://github.com/sendgrid/java-http-client/releases)
2222
- BIG thanks to [Diego Camargo](https://github.com/belfazt) for the pull request!
23-
- The breaking change is that variables that were public are now private and accessable only via getters and setters
24-
- The `Request` object attributes are now only accessable through getters/setters
23+
- The breaking change is that variables that were public are now private and accessible only via getters and setters
24+
- The `Request` object attributes are now only accessible through getters/setters
2525
- `request.method` is now `request.setMethod(string)`
2626
- `request.endpoint` is now `request.setEndpoint(string)`
2727
- `request.body` is now `request.setBody(string)`
28-
- The `Response` object attributes are now only accessable through getters/setters
28+
- The `Response` object attributes are now only accessible through getters/setters
2929
- `response.statusCode` is now `response.getStatusCode()`
3030
- `response.body` is now `response.getBody()`
3131
- `response.headers` is now `response.getHeaders()`
@@ -118,7 +118,7 @@ request.addQueryParam("limit", "1");
118118

119119
## [2.2.2] - 2015-5-23
120120
### Fixed
121-
- Subsitution orders being swapped via [#65](https://github.com/sendgrid/sendgrid-java/pull/65)
121+
- Substitution orders being swapped via [#65](https://github.com/sendgrid/sendgrid-java/pull/65)
122122

123123
## [2.2.1] - 2015-5-14
124124
### Changed

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ Please run your code through:
158158
- [FindBugs](http://findbugs.sourceforge.net/)
159159
- [CheckStyle](http://checkstyle.sourceforge.net/) with [Google's Java Style Guide](http://checkstyle.sourceforge.net/reports/google-java-style.html).
160160

161-
## Creating a Pull Request<a name="creating-a-pull-request"></a>
161+
<a name="creating-a-pull-request"></a>
162+
## Creating a Pull Request
163+
162164

163165
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork,
164166
and configure the remotes:

TROUBLESHOOTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ We have an issue to remove that dependency [here](https://github.com/sendgrid/ja
102102
<a name="request-body"></a>
103103
## Viewing the Request Body
104104

105-
When debugging or testing, it may be useful to exampine the raw request body to compare against the [documented format](https://sendgrid.com/docs/API_Reference/api_v3.html).
105+
When debugging or testing, it may be useful to examine the raw request body to compare against the [documented format](https://sendgrid.com/docs/API_Reference/api_v3.html).
106106

107107
You can do this right before you call `request.setBody(mail.build())` like so:
108108

USAGE.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ For more information, please see our [User Guide](http://sendgrid.com/docs/User_
161161
```
162162
## Retrieve a specific whitelisted IP
163163

164-
**This endpoint allows you to retreive a specific IP address that has been whitelisted.**
164+
**This endpoint allows you to retrieve a specific IP address that has been whitelisted.**
165165

166166
You must include the ID for the specific IP address you want to retrieve in your call.
167167

@@ -497,7 +497,7 @@ If the API Key ID does not exist an HTTP 404 will be returned.
497497

498498
**This endpoint allows you to revoke an existing API Key.**
499499

500-
Authentications using this API Key will fail after this request is made, with some small propogation delay.If the API Key ID does not exist an HTTP 404 will be returned.
500+
Authentications using this API Key will fail after this request is made, with some small propagation delay.If the API Key ID does not exist an HTTP 404 will be returned.
501501

502502
The API Keys feature allows customers to be able to generate an API Key credential which can be used for authentication with the SendGrid v3 Web API or the [Mail API Endpoint](https://sendgrid.com/docs/API_Reference/Web_API/mail.html).
503503

@@ -563,7 +563,7 @@ This endpoint will return information for each group ID that you include in your
563563

564564
Suppressions are a list of email addresses that will not receive content sent under a given [group](https://sendgrid.com/docs/API_Reference/Web_API_v3/Suppression_Management/groups.html).
565565

566-
Suppression groups, or [unsubscribe groups](https://sendgrid.com/docs/API_Reference/Web_API_v3/Suppression_Management/groups.html), allow you to label a category of content that you regularly send. This gives your recipients the ability to opt out of a specific set of your email. For example, you might define a group for your transactional email, and one for your marketing email so that your users can continue recieving your transactional email witout having to receive your marketing content.
566+
Suppression groups, or [unsubscribe groups](https://sendgrid.com/docs/API_Reference/Web_API_v3/Suppression_Management/groups.html), allow you to label a category of content that you regularly send. This gives your recipients the ability to opt out of a specific set of your email. For example, you might define a group for your transactional email, and one for your marketing email so that your users can continue receiving your transactional email without having to receive your marketing content.
567567

568568
### GET /asm/groups
569569

@@ -814,9 +814,9 @@ A global suppression (or global unsubscribe) is an email address of a recipient
814814
```
815815
## Retrieve a Global Suppression
816816

817-
**This endpoint allows you to retrieve a global suppression. You can also use this endpoint to confirm if an email address is already globally suppresed.**
817+
**This endpoint allows you to retrieve a global suppression. You can also use this endpoint to confirm if an email address is already globally suppressed.**
818818

819-
If the email address you include in the URL path parameter `{email}` is alreayd globally suppressed, the response will include that email address. If the address you enter for `{email}` is not globally suppressed, an empty JSON object `{}` will be returned.
819+
If the email address you include in the URL path parameter `{email}` is already globally suppressed, the response will include that email address. If the address you enter for `{email}` is not globally suppressed, an empty JSON object `{}` will be returned.
820820

821821
A global suppression (or global unsubscribe) is an email address of a recipient who does not want to receive any of your messages. A globally suppressed recipient will be removed from any email you send. For more information, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Suppressions/global_unsubscribes.html).
822822

@@ -2018,7 +2018,7 @@ Valid operators for create and update depend on the type of the field you are se
20182018

20192019
Segment conditions using "eq" or "ne" for email clicks and opens should provide a "field" of either *clicks.campaign_identifier* or *opens.campaign_identifier*. The condition value should be a string containing the id of a completed campaign.
20202020

2021-
Segments may contain multiple condtions, joined by an "and" or "or" in the "and_or" field. The first condition in the conditions list must have an empty "and_or", and subsequent conditions must all specify an "and_or".
2021+
Segments may contain multiple conditions, joined by an "and" or "or" in the "and_or" field. The first condition in the conditions list must have an empty "and_or", and subsequent conditions must all specify an "and_or".
20222022

20232023
The Contacts API helps you manage your [Marketing Campaigns](https://sendgrid.com/docs/User_Guide/Marketing_Campaigns/index.html) recipients.
20242024

@@ -2701,7 +2701,7 @@ This endpoint has a helper, check it out [here](https://github.com/sendgrid/send
27012701
Request request = new Request();
27022702
request.setMethod(Method.POST);
27032703
request.setEndpoint("mail/send");
2704-
request.setBody("{\"custom_args\":{\"New Argument 1\":\"New Value 1\",\"activationAttempt\":\"1\",\"customerAccountNumber\":\")[CUSTOMER ACCOUNT NUMBER GOES HERE]\"},\"from\":{\"email\":\"[email protected]\",\"name\":\"Sam Smith\"},\"attachments\":[{\"name\":\"file1\",\"filename\":\"file1.jpg\",\"content\":\"[BASE64 encoded content block here]\",\"disposition\":\"inline\",\"content_id\":\"ii_139db99fdb5c3704\",\"type\":\"jpg\"}],\"personalizations\":[{\"to\":[{\"email\":\"[email protected]\",\"name\":\"John Doe\"}],\"cc\":[{\"email\":\"[email protected]\",\"name\":\"Jane Doe\"}],\"bcc\":[{\"email\":\"[email protected]\",\"name\":\"Sam Doe\"}],\"custom_args\":{\"New Argument 1\":\"New Value 1\",\"activationAttempt\":\"1\",\"customerAccountNumber\":\"[CUSTOMER ACCOUNT NUMBER GOES HERE]\"},\"headers\":{\"X-Accept-Language\":\"en\",\"X-Mailer\":\"MyApp\"},\"send_at\":1409348513,\"substitutions\":{\"type\":\"object\",\"id\":\"substitutions\"},\"subject\":\"Hello, World!\"}],\"subject\":\"Hello, World!\",\"ip_pool_name\":\"[YOUR POOL NAME GOES HERE]\",\"content\":[{\"type\":\"text/html\",\"value\":\"<html><p>Hello, world!</p><img src=[CID GOES HERE]></img></html>\"}],\"headers\":{},\"asm\":{\"groups_to_display\":[1,2,3],\"group_id\":1},\"batch_id\":\"[YOUR BATCH ID GOES HERE]\",\"tracking_settings\":{\"subscription_tracking\":{\"text\":\"If you would like to unsubscribe and stop receiveing these emails <% click here %>.\",\"enable\":true,\"html\":\"If you would like to unsubscribe and stop receiving these emails <% clickhere %>.\",\"substitution_tag\":\"<%click here%>\"},\"open_tracking\":{\"enable\":true,\"substitution_tag\":\"%opentrack\"},\"click_tracking\":{\"enable\":true,\"enable_text\":true},\"ganalytics\":{\"utm_campaign\":\"[NAME OF YOUR REFERRER SOURCE]\",\"enable\":true,\"utm_name\":\"[NAME OF YOUR CAMPAIGN]\",\"utm_term\":\"[IDENTIFY PAID KEYWORDS HERE]\",\"utm_content\":\"[USE THIS SPACE TO DIFFERENTIATE YOUR EMAIL FROM ADS]\",\"utm_medium\":\"[NAME OF YOUR MARKETING MEDIUM e.g. email]\"}},\"mail_settings\":{\"footer\":{\"text\":\"Thanks,/n The SendGrid Team\",\"enable\":true,\"html\":\"<p>Thanks</br>The SendGrid Team</p>\"},\"spam_check\":{\"threshold\":3,\"post_to_url\":\"http://example.com/compliance\",\"enable\":true},\"bypass_list_management\":{\"enable\":true},\"sandbox_mode\":{\"enable\":false},\"bcc\":{\"enable\":true,\"email\":\"[email protected]\"}},\"reply_to\":{\"email\":\"[email protected]\",\"name\":\"Sam Smith\"},\"sections\":{\"section\":{\":sectionName2\":\"section 2 text\",\":sectionName1\":\"section 1 text\"}},\"template_id\":\"[YOUR TEMPLATE ID GOES HERE]\",\"categories\":[\"category1\",\"category2\"],\"send_at\":1409348513}";
2704+
request.setBody("{\"custom_args\":{\"New Argument 1\":\"New Value 1\",\"activationAttempt\":\"1\",\"customerAccountNumber\":\")[CUSTOMER ACCOUNT NUMBER GOES HERE]\"},\"from\":{\"email\":\"[email protected]\",\"name\":\"Sam Smith\"},\"attachments\":[{\"name\":\"file1\",\"filename\":\"file1.jpg\",\"content\":\"[BASE64 encoded content block here]\",\"disposition\":\"inline\",\"content_id\":\"ii_139db99fdb5c3704\",\"type\":\"jpg\"}],\"personalizations\":[{\"to\":[{\"email\":\"[email protected]\",\"name\":\"John Doe\"}],\"cc\":[{\"email\":\"[email protected]\",\"name\":\"Jane Doe\"}],\"bcc\":[{\"email\":\"[email protected]\",\"name\":\"Sam Doe\"}],\"custom_args\":{\"New Argument 1\":\"New Value 1\",\"activationAttempt\":\"1\",\"customerAccountNumber\":\"[CUSTOMER ACCOUNT NUMBER GOES HERE]\"},\"headers\":{\"X-Accept-Language\":\"en\",\"X-Mailer\":\"MyApp\"},\"send_at\":1409348513,\"substitutions\":{\"type\":\"object\",\"id\":\"substitutions\"},\"subject\":\"Hello, World!\"}],\"subject\":\"Hello, World!\",\"ip_pool_name\":\"[YOUR POOL NAME GOES HERE]\",\"content\":[{\"type\":\"text/html\",\"value\":\"<html><p>Hello, world!</p><img src=[CID GOES HERE]></img></html>\"}],\"headers\":{},\"asm\":{\"groups_to_display\":[1,2,3],\"group_id\":1},\"batch_id\":\"[YOUR BATCH ID GOES HERE]\",\"tracking_settings\":{\"subscription_tracking\":{\"text\":\"If you would like to unsubscribe and stop receiving these emails <% click here %>.\",\"enable\":true,\"html\":\"If you would like to unsubscribe and stop receiving these emails <% clickhere %>.\",\"substitution_tag\":\"<%click here%>\"},\"open_tracking\":{\"enable\":true,\"substitution_tag\":\"%opentrack\"},\"click_tracking\":{\"enable\":true,\"enable_text\":true},\"ganalytics\":{\"utm_campaign\":\"[NAME OF YOUR REFERRER SOURCE]\",\"enable\":true,\"utm_name\":\"[NAME OF YOUR CAMPAIGN]\",\"utm_term\":\"[IDENTIFY PAID KEYWORDS HERE]\",\"utm_content\":\"[USE THIS SPACE TO DIFFERENTIATE YOUR EMAIL FROM ADS]\",\"utm_medium\":\"[NAME OF YOUR MARKETING MEDIUM e.g. email]\"}},\"mail_settings\":{\"footer\":{\"text\":\"Thanks,/n The SendGrid Team\",\"enable\":true,\"html\":\"<p>Thanks</br>The SendGrid Team</p>\"},\"spam_check\":{\"threshold\":3,\"post_to_url\":\"http://example.com/compliance\",\"enable\":true},\"bypass_list_management\":{\"enable\":true},\"sandbox_mode\":{\"enable\":false},\"bcc\":{\"enable\":true,\"email\":\"[email protected]\"}},\"reply_to\":{\"email\":\"[email protected]\",\"name\":\"Sam Smith\"},\"sections\":{\"section\":{\":sectionName2\":\"section 2 text\",\":sectionName1\":\"section 1 text\"}},\"template_id\":\"[YOUR TEMPLATE ID GOES HERE]\",\"categories\":[\"category1\",\"category2\"],\"send_at\":1409348513}";
27052705
Response response = sg.api(request);
27062706
System.out.println(response.getStatusCode());
27072707
System.out.println(response.getBody());
@@ -4961,7 +4961,7 @@ For more information about your user profile:
49614961

49624962
**This endpoint allows you to retrieve the current credit balance for your account.**
49634963

4964-
Your monthly credit allotment limits the number of emails you may send before incurring overage charges. For more information about credits and billing, please visit our [Clssroom](https://sendgrid.com/docs/Classroom/Basics/Billing/billing_info_and_faqs.html).
4964+
Your monthly credit allotment limits the number of emails you may send before incurring overage charges. For more information about credits and billing, please visit our [Classroom](https://sendgrid.com/docs/Classroom/Basics/Billing/billing_info_and_faqs.html).
49654965

49664966
### GET /user/credits
49674967

@@ -5453,7 +5453,7 @@ The inbound parse webhook allows you to have incoming emails parsed, extracting
54535453

54545454
**This endpoint allows you to retrieve all of your current inbound parse settings.**
54555455

5456-
The inbound parse webhook allows you to have incoming emails parsed, extracting some or all of the contnet, and then have that content POSTed by SendGrid to a URL of your choosing. For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Webhooks/parse.html).
5456+
The inbound parse webhook allows you to have incoming emails parsed, extracting some or all of the content, and then have that content POSTed by SendGrid to a URL of your choosing. For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Webhooks/parse.html).
54575457

54585458
### GET /user/webhooks/parse/settings
54595459

@@ -5476,7 +5476,7 @@ The inbound parse webhook allows you to have incoming emails parsed, extracting
54765476

54775477
**This endpoint allows you to update a specific inbound parse setting.**
54785478

5479-
The inbound parse webhook allows you to have incoming emails parsed, extracting some or all of the contnet, and then have that content POSTed by SendGrid to a URL of your choosing. For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Webhooks/parse.html).
5479+
The inbound parse webhook allows you to have incoming emails parsed, extracting some or all of the content, and then have that content POSTed by SendGrid to a URL of your choosing. For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Webhooks/parse.html).
54805480

54815481
### PATCH /user/webhooks/parse/settings/{hostname}
54825482

@@ -5500,7 +5500,7 @@ The inbound parse webhook allows you to have incoming emails parsed, extracting
55005500

55015501
**This endpoint allows you to retrieve a specific inbound parse setting.**
55025502

5503-
The inbound parse webhook allows you to have incoming emails parsed, extracting some or all of the contnet, and then have that content POSTed by SendGrid to a URL of your choosing. For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Webhooks/parse.html).
5503+
The inbound parse webhook allows you to have incoming emails parsed, extracting some or all of the content, and then have that content POSTed by SendGrid to a URL of your choosing. For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Webhooks/parse.html).
55045504

55055505
### GET /user/webhooks/parse/settings/{hostname}
55065506

@@ -5523,7 +5523,7 @@ The inbound parse webhook allows you to have incoming emails parsed, extracting
55235523

55245524
**This endpoint allows you to delete a specific inbound parse setting.**
55255525

5526-
The inbound parse webhook allows you to have incoming emails parsed, extracting some or all of the contnet, and then have that content POSTed by SendGrid to a URL of your choosing. For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Webhooks/parse.html).
5526+
The inbound parse webhook allows you to have incoming emails parsed, extracting some or all of the content, and then have that content POSTed by SendGrid to a URL of your choosing. For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Webhooks/parse.html).
55275527

55285528
### DELETE /user/webhooks/parse/settings/{hostname}
55295529

@@ -5544,9 +5544,9 @@ The inbound parse webhook allows you to have incoming emails parsed, extracting
55445544
```
55455545
## Retrieves Inbound Parse Webhook statistics.
55465546

5547-
**This endpoint allows you to retrieve the statistics for your Parse Webhook useage.**
5547+
**This endpoint allows you to retrieve the statistics for your Parse Webhook usage.**
55485548

5549-
SendGrid's Inbound Parse Webhook allows you to parse the contents and attachments of incomming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 20MB in size, including all attachments.
5549+
SendGrid's Inbound Parse Webhook allows you to parse the contents and attachments of incoming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 20MB in size, including all attachments.
55505550
55515551
There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the [Library Index](https://sendgrid.com/docs/Integrate/libraries.html#-Webhook-Libraries).
55525552

build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ task renameSendGridVersionJarToSendGridJar {
9494
}
9595
}
9696

97+
task startPrism(type: Exec) {
98+
workingDir 'scripts'
99+
commandLine './startPrism.sh'
100+
}
101+
97102
task javadocJar(type: Jar, dependsOn: javadoc) {
98103
classifier = 'javadoc'
99104
from 'build/docs/javadoc'

proposals/mail-helper-refactor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public class SendGridExample {
110110
tos,
111111
plainTextContent,
112112
htmlContent,
113-
globalSubstition); // or globalSubstitutions
113+
globalSubstitution); // or globalSubstitutions
114114

115115
SendGrid sendgrid = new SendGrid(System.getenv("SENDGRID_API_KEY"));
116116
try {

0 commit comments

Comments
 (0)