Mercurial Hosting > luan
comparison src/goodjava/mail/Examples.java @ 1829:0eb615de1f80
add mail helo
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Sun, 22 Sep 2024 20:05:54 -0600 |
| parents | 92860f763715 |
| children | d72a52232f79 |
comparison
equal
deleted
inserted
replaced
| 1828:09e90d94b7b5 | 1829:0eb615de1f80 |
|---|---|
| 10 | 10 |
| 11 public class Examples { | 11 public class Examples { |
| 12 | 12 |
| 13 private static Smtp newSmtp() throws IOException, MailException { | 13 private static Smtp newSmtp() throws IOException, MailException { |
| 14 Socket socket = new Socket("smtpcorp.com",2525); | 14 Socket socket = new Socket("smtpcorp.com",2525); |
| 15 Smtp smtp = new Smtp(socket); | 15 Smtp smtp = new Smtp(socket,"GoodJava"); |
| 16 smtp.authenticate("luan","luanhost2"); | 16 smtp.authenticate("luan","luanhost2"); |
| 17 return smtp; | 17 return smtp; |
| 18 } | 18 } |
| 19 | 19 |
| 20 private static void smtp() throws IOException, MailException { | 20 private static void smtp() throws IOException, MailException { |
