Skip to content

Commit 2341016

Browse files
Update README.md
1 parent 73f8c8f commit 2341016

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

README.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ MailerSend Java SDK
1212
- [Add CC, BCC recipients](#add-cc-bcc-recipients)
1313
- [Send a template-based email](#send-a-template-based-email)
1414
- [Advanced personalization](#advanced-personalization)
15-
- [Simple personalization](#simple-personalization)
1615
- [Send email with attachment](#send-email-with-attachment)
1716
- [Schedule an email](#schedule-an-email)
1817
- [Send bulk emails](#send-bulk-emails)
@@ -241,12 +240,6 @@ public void sendEmail() {
241240

242241
email.setTemplateId("Your MailerSend template ID");
243242

244-
// you can add a variable for a specific recipient
245-
email.addVariable(recipient, "variable name", "variable value");
246-
247-
// you can use the addVariable overload to add a variable to all recipients
248-
email.addVariable("all recipients variable name", "variable value");
249-
250243
MailerSend ms = new MailerSend();
251244

252245
ms.setToken("Your API token");
@@ -312,52 +305,6 @@ public void sendEmail() {
312305
}
313306
```
314307

315-
### Simple personalization
316-
317-
```java
318-
import com.mailersend.sdk.emails.Email;
319-
import com.mailersend.sdk.MailerSend;
320-
import com.mailersend.sdk.MailerSendResponse;
321-
import com.mailersend.sdk.exceptions.MailerSendException;
322-
323-
public void sendEmail() {
324-
325-
Email email = new Email();
326-
327-
email.setFrom("name", "your email");
328-
329-
email.setSubject("Subject {$var1} {$var2}");
330-
331-
email.setPlain("This is the text version with a {$var1} and a {$var2}.")
332-
email.setHtml("<p>This is the HTML version with a {$var1} and a {$var2}.</p>");
333-
334-
Recipient recipient = new Recipient("name", "your@recipient.com");
335-
336-
email.addRecipient(recipient);
337-
338-
email.setTemplateId("Your MailerSend template ID");
339-
340-
// you can add a variable for a specific recipient
341-
email.addVariable(recipient, "var1", "variable");
342-
343-
// you can use the addVariable overload to add a variable to all recipients
344-
email.addVariable("var2", "second variable");
345-
346-
MailerSend ms = new MailerSend();
347-
348-
ms.setToken("Your API token");
349-
350-
try {
351-
352-
MailerSendResponse response = ms.emails().send(email);
353-
System.out.println(response.messageId);
354-
} catch (MailerSendException e) {
355-
356-
e.printStackTrace();
357-
}
358-
}
359-
```
360-
361308
### Send email with attachment
362309

363310
```java

0 commit comments

Comments
 (0)