Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,243 members, 7,953,916 topics. Date: Friday, 20 September 2024 at 08:52 AM |
Nairaland Forum / Science/Technology / Programming / Sending Email With Java In HTML Format (javamail API) (639 Views)
Can I Claim Expert In Html,javascript,css & Php After 1yrs Of Constant Learning? / Learning To Program With Java by the Fulaman / How Can I Learn OOP With Java? (2) (3) (4)
(1) (Reply)
Sending Email With Java In HTML Format (javamail API) by Anatech(m): 1:56am On May 07, 2015 |
Sending email with Java You can insert HTML tags when sending email in text format but that isn’t enough to make the e-mail interpreted as an HTML e-mail in a web mail or an e-mail client program. So, instead of using: First of all, download the Java Mail jar file (to add to your Classpath) Message msg = new MimeMessage(session); msg.setText(message); we should invoke the setContent(Object obj, String type) method of the MimeMessage object. The setContent() method specifies the mime type of the content explicitly, and for HTML format, the type parameter must be “text/html”: <a href="http://www.anatech.com.ng/sending-email-with-java/">Read More</a> |
(1) (Reply)
Different Types Of Ddos Attack / Security Information System / How To Apply Adclx To Blog
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 6 |