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