Mercurial Hosting > luan
comparison src/goodjava/mail/Examples.java @ 1587:fa1a9aceac3e
mail work
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 12 Mar 2021 23:22:53 -0700 |
parents | c0ef8acf069d |
children | aed284cae1f0 |
comparison
equal
deleted
inserted
replaced
1586:fcca0ddf5a4d | 1587:fa1a9aceac3e |
---|---|
40 ; | 40 ; |
41 Map<String,String> headers = new LinkedHashMap<String,String>(); | 41 Map<String,String> headers = new LinkedHashMap<String,String>(); |
42 headers.put("From","smtp@luan.software"); | 42 headers.put("From","smtp@luan.software"); |
43 headers.put("To","fschmidt@gmail.com"); | 43 headers.put("To","fschmidt@gmail.com"); |
44 headers.put("Subject","test text"); | 44 headers.put("Subject","test text"); |
45 headers.put("Content-Type","text/plain; charset=utf-8"); | 45 // headers.put("Content-Type","text/plain; charset=utf-8"); |
46 Message msg = new Message(headers,text); | 46 Message msg = new Message(headers,text); |
47 Smtp smtp = newSmtp(); | 47 Smtp smtp = newSmtp(); |
48 smtp.send(msg); | 48 smtp.send(msg); |
49 smtp.close(); | 49 smtp.close(); |
50 } | 50 } |
122 smtp.send(msg); | 122 smtp.send(msg); |
123 smtp.close(); | 123 smtp.close(); |
124 } | 124 } |
125 | 125 |
126 public static void main(String[] args) throws Exception { | 126 public static void main(String[] args) throws Exception { |
127 multi(); | 127 mailText(); |
128 } | 128 } |
129 } | 129 } |