|
1 | 1 | package io.vertx.example.mail;
|
2 | 2 |
|
3 | 3 | import io.vertx.core.AbstractVerticle;
|
4 |
| -import io.vertx.core.MultiMap; |
5 |
| -import io.vertx.core.http.CaseInsensitiveHeaders; |
6 | 4 | import io.vertx.example.util.Runner;
|
7 | 5 | import io.vertx.ext.mail.MailConfig;
|
8 | 6 | import io.vertx.ext.mail.MailMessage;
|
@@ -37,18 +35,13 @@ public void start() {
|
37 | 35 |
|
38 | 36 | MailMessage email = new MailMessage()
|
39 | 37 |
|
40 |
| - |
41 |
| - |
42 |
| - MultiMap headers = MultiMap.caseInsensitiveMultiMap(); |
43 |
| - |
44 |
| - headers.add("X-Mailer", "Vert.x Mail-Client 3.3.0-SNAPSHOT"); |
45 |
| - headers. add( "Message-ID", "[email protected]"); |
46 |
| - headers. add( "Reply-To", "[email protected]"); |
47 |
| - headers.add("Received", "by vertx mail service"); |
48 |
| - headers.add("Received", "from [192.168.1.1] by localhost"); |
49 |
| - |
50 |
| - email.setHeaders(headers); |
51 |
| - email.setText("This message should have a custom Message-ID"); |
| 38 | + |
| 39 | + .addHeader("X-Mailer", "Vert.x Mail-Client 3.3.0-SNAPSHOT") |
| 40 | + . addHeader( "Message-ID", "[email protected]") |
| 41 | + . addHeader( "Reply-To", "[email protected]") |
| 42 | + .addHeader("Received", "by vertx mail service") |
| 43 | + .addHeader("Received", "from [192.168.1.1] by localhost") |
| 44 | + .setText("This message should have a custom Message-ID"); |
52 | 45 |
|
53 | 46 | mailClient.sendMail(email, result -> {
|
54 | 47 | if (result.succeeded()) {
|
|
0 commit comments