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
Ad icon
ZTE MF283U 4G Unlocked Router (Used)
ayanthamaxi
Updated:
Sunday at 8:26 PM
ලංකාවේ හොඳම උපකාරක පන්ති සහ ගුරුවරුන් එකම තැනකින් - TopTuition.lk
dulithapathum
Updated:
Saturday at 8:07 AM
Colombo
RidhMathraa ’26 🎶✨
Tmadhusanka
Updated:
Jul 15, 2026
Ad icon
Colombo
PXN V10 Pro Direct Drive Racing Wheel (Under Warranty)
Abdur Rahman
Updated:
Jul 15, 2026
Ad icon
USDT ණය සේවාව - USDT Loan Service
පුරවැසියා
Updated:
Jul 15, 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
Hath warak paha keeyada? (hatha wadikireema paha)
Post reply
Top
Bottom