Skip to content

Commit 338cb04

Browse files
Update mail-helper-refactor.md
1 parent f5e32f6 commit 338cb04

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

proposals/mail-helper-refactor.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class SendGridExample {
1212
public static void main(String[] args) throws SendGridException {
1313
From from = new From("[email protected]", "Example User");
1414
To to = new To("[email protected]", "Example User");
15-
Subject subject = Subject("Sending with SendGrid is Fun");
15+
Subject subject = new Subject("Sending with SendGrid is Fun");
1616
PlainTextContent plainTextContent = new PlainTextContent("and easy to do anywhere, even with Java");
1717
HtmlContent htmlContent = new HtmlContent("<strong>and easy to do anywhere, even with Java</strong>");
1818
SendGridMessage email = new SendGridMessage(from,
@@ -51,7 +51,7 @@ public class SendGridExample {
5151
tos.add(new To("[email protected]", "Example User1"));
5252
tos.add(new To("[email protected]", "Example User2"));
5353
tos.add(new To("[email protected]", "Example User3"));
54-
Subject subject = Subject("Sending with SendGrid is Fun");
54+
Subject subject = new Subject("Sending with SendGrid is Fun");
5555
PlainTextContent plainTextContent = new PlainTextContent("and easy to do anywhere, even with Java");
5656
HtmlContent htmlContent = new HtmlContent("<strong>and easy to do anywhere, even with Java</strong>");
5757
SendGridMessage email = new SendGridMessage(from,
@@ -101,7 +101,7 @@ public class SendGridExample {
101101
sub.add("-github-", "http://github.com/caseyw");
102102
tos.add(new To("[email protected]", "Example User3"), sub);
103103
// Alternatively, you can pass in a collection of subjects OR add a subject to the `To` object
104-
Subject subject = Subject("Hi -name-!");
104+
Subject subject = new Subject("Hi -name-!");
105105
Substitution globalSubstitution = new Substitution("-time-", "<Current Time>");
106106
PlainTextContent plainTextContent = new PlainTextContent("Hello -name-, your github is -github-, email sent at -time-");
107107
HtmlContent htmlContent = new HtmlContent("<strong>Hello -name-, your github is <a href=\"-github-\">here</a></strong> email sent at -time-");
@@ -140,7 +140,7 @@ public class SendGridExample {
140140
public static void main(String[] args) throws SendGridException {
141141
From from = new From("[email protected]", "Example User");
142142
To to = new To("[email protected]", "Example User");
143-
Subject subject = Subject("Sending with SendGrid is Fun");
143+
Subject subject = new Subject("Sending with SendGrid is Fun");
144144
PlainTextContent plainTextContent = new PlainTextContent("and easy to do anywhere, even with Java");
145145
HtmlContent htmlContent = new HtmlContent("<strong>and easy to do anywhere, even with Java</strong>");
146146
SendGridMessage email = new SendGridMessage(from,
@@ -362,7 +362,7 @@ public class SendGridExample {
362362
public static void main(String[] args) throws SendGridException {
363363
From from = new From("[email protected]", "Example User");
364364
To to = new To("[email protected]", "Example User");
365-
Subject subject = Subject("Sending with SendGrid is Fun");
365+
Subject subject = new Subject("Sending with SendGrid is Fun");
366366
PlainTextContent plainTextContent = new PlainTextContent("and easy to do anywhere, even with Java");
367367
HtmlContent htmlContent = new HtmlContent("<strong>and easy to do anywhere, even with Java</strong>");
368368
SendGridMessage email = new SendGridMessage(from,
@@ -437,7 +437,7 @@ public class SendGridExample {
437437
public static void main(String[] args) throws SendGridException {
438438
From from = new From("[email protected]", "Example User");
439439
To to = new To("[email protected]", "Example User");
440-
Subject subject = Subject("Sending with SendGrid is Fun");
440+
Subject subject = new Subject("Sending with SendGrid is Fun");
441441
PlainTextContent plainTextContent = new PlainTextContent("and easy to do anywhere, even with Java");
442442
HtmlContent htmlContent = new HtmlContent("<strong>and easy to do anywhere, even with Java</strong>");
443443
SendGridMessage email = new SendGridMessage(from,

0 commit comments

Comments
 (0)