Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
RHCSA, RHCE, AWS, Docker, Kubernetes Training
Sanjeewani95
Updated:
Tuesday at 10:28 AM
🛡️ Kaspersky Antivirus – 1 Year / 1 Device | Rs. 2,300 | Only 9 Left
KSPathirana
Updated:
Monday at 2:42 PM
Ad icon
Professional CCTV Installation Service
Techguy231
Updated:
Sunday at 10:50 AM
Ad icon
I'll research & write an article - Rs. 2000 onwards
Blogerwiki
Updated:
Sep 3, 2026
House Plan
lenura
Updated:
Sep 2, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
Computers & Internet
Problems and Troubleshooting
java help needed
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="mit2" data-source="post: 5399891" data-attributes="member: 56929"><p>machn try with this....</p><p></p><p>[CODE]</p><p>import java.io.*;</p><p>import javax.mail.*;</p><p>import javax.mail.internet.*;</p><p>import javax.activation.*;</p><p></p><p>public class SendApp {</p><p> public static void send(String smtpHost, int smtpPort, String from, String to, String subject,</p><p> String content) throws AddressException, MessagingException {</p><p></p><p> java.util.Properties props = new java.util.Properties();</p><p> props.put("mail.smtp.host", smtpHost);</p><p> props.put("mail.smtp.port", "" + smtpPort);</p><p> Session session = Session.getDefaultInstance(props, null);</p><p></p><p> Message msg = new MimeMessage(session);</p><p> msg.setFrom(new InternetAddress(from));</p><p> msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));</p><p> msg.setSubject(subject);</p><p> msg.setText(content);</p><p></p><p> Transport.send(msg);</p><p> }</p><p></p><p> public static void main(String[] args) throws Exception {</p><p> send("hostname", 25, "j@s.com", "s@s.com", "re: dinner", "body");</p><p> }</p><p>}[/CODE]</p><p></p><p>man laga me okkoma set 1 tibba...eth hrd 1 full 4mat una machn <img src="/styles/default/xenforo/smilies/default/sad.gif" class="smilie" loading="lazy" alt=":(" title="Sad :(" data-shortname=":(" />....mata mataka hatiyata meka wagei... try karala balapn... <img src="/styles/default/xenforo/smilies/default/D.gif" class="smilie" loading="lazy" alt=":D" title="Big grin :D" data-shortname=":D" /></p></blockquote><p></p>
[QUOTE="mit2, post: 5399891, member: 56929"] machn try with this.... [CODE] import java.io.*; import javax.mail.*; import javax.mail.internet.*; import javax.activation.*; public class SendApp { public static void send(String smtpHost, int smtpPort, String from, String to, String subject, String content) throws AddressException, MessagingException { java.util.Properties props = new java.util.Properties(); props.put("mail.smtp.host", smtpHost); props.put("mail.smtp.port", "" + smtpPort); Session session = Session.getDefaultInstance(props, null); Message msg = new MimeMessage(session); msg.setFrom(new InternetAddress(from)); msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to)); msg.setSubject(subject); msg.setText(content); Transport.send(msg); } public static void main(String[] args) throws Exception { send("hostname", 25, "j@s.com", "s@s.com", "re: dinner", "body"); } }[/CODE] man laga me okkoma set 1 tibba...eth hrd 1 full 4mat una machn :(....mata mataka hatiyata meka wagei... try karala balapn... :D [/QUOTE]
Insert quotes…
Verification
Hata thunen beduwama keeyada? (60 bedeema thuna)
Post reply
Top
Bottom