Changeset 5313 for branches/release-0.13.x/pfixcore/src/de/schlund/pfixcore/util/email/EmailSender.java
- Timestamp:
- 08/24/10 18:01:33 (21 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/release-0.13.x/pfixcore/src/de/schlund/pfixcore/util/email/EmailSender.java
r3367 r5313 72 72 throws EmailSenderException { 73 73 sendMail(subject, text, null, to, from, smtphost, null, null, false); 74 } 75 76 public static void sendMail( 77 String subject, 78 String text, 79 String[] to, 80 String from, 81 String smtphost, 82 String encoding) 83 throws EmailSenderException { 84 sendMail(subject, text, null, to, from, smtphost, null, null, false, encoding); 74 85 } 75 86 … … 101 112 } 102 113 114 public static void sendMail( 115 String subject, 116 String text, 117 String[] to, 118 String from, 119 String smtphost, 120 String authuser, 121 String authpassword, 122 String encoding) 123 throws EmailSenderException { 124 sendMail(subject, text, null, to, from, smtphost, authuser, authpassword, false, encoding); 125 } 126 103 127 /** 104 128 * Send an email. … … 123 147 throws EmailSenderException { 124 148 sendMail(subject, text, headers, to, from, smtphost, null, null, false); 149 } 150 151 public static void sendMail( 152 String subject, 153 String text, 154 Map<String, String> headers, 155 String[] to, 156 String from, 157 String smtphost, 158 String encoding) 159 throws EmailSenderException { 160 sendMail(subject, text, headers, to, from, smtphost, null, null, false, encoding); 125 161 } 126 162 … … 145 181 */ 146 182 public static void sendMail( 183 String subject, 184 String text, 185 Map<String, String> headers, 186 String[] to, 187 String from, 188 String smtphost, 189 String authuser, 190 String authpassword, 191 boolean secure) 192 throws EmailSenderException { 193 sendMail(subject, text, headers, to, from, smtphost, authuser, authpassword, secure, CHARSET); 194 } 195 196 public static void sendMail( 147 197 String subject, 148 198 String text, … … 153 203 String authuser, 154 204 String authpassword, 155 boolean secure) 205 boolean secure, 206 String encoding) 156 207 throws EmailSenderException { 157 208 … … 231 282 // got everything, now send mail 232 283 try { 233 msg.setText(text, CHARSET);234 msg.setHeader("Content-Type", "text/plain; charset=" + CHARSET);284 msg.setText(text, encoding); 285 msg.setHeader("Content-Type", "text/plain; charset=" + encoding); 235 286 msg.setHeader("Content-Transfer-Encoding", "8bit"); 236 287 … … 247 298 248 299 msg.setRecipients(Message.RecipientType.TO, toaddresses); 249 msg.setSubject(subject, CHARSET);300 msg.setSubject(subject, encoding); 250 301 msg.setFrom(fromaddress); 251 302 msg.setSentDate(new Date()); … … 306 357 } 307 358 } 308 359 309 360 }
