26290 total geeks with 3498 solutions
Recent challengers:
 Welcome, you are an anonymous user! [register] [login] Get a yourname@osix.net email address 

Articles

GEEK

User's box
Username:
Password:

Forgot password?
New account

Shoutbox
MaxMouse
It's Friday... That's good enough for me!
CodeX
non stop lolz here but thats soon to end thanks to uni, surely the rest of the world is going good?
stabat
how things are going guys? Here... boring...
CodeX
I must be going wrong on the password lengths then, as long as it was done on ECB
MaxMouse
lol... the key is in hex (MD5: of the string "doit" without the "'s) and is in lower case. Maybe i should have submitted this as a challenge!

Donate
Donate and help us fund new challenges
Donate!
Due Date: May 31
May Goal: $40.00
Gross: $0.00
Net Balance: $0.00
Left to go: $40.00
Contributors


News Feeds
The Register
Lego X-wing fighter
touches down in New
York"s Times Square
Experts: Network
security
deteriorating,
privacy a lost
cause
Internet cafés
declared "illegal
businesses" in Ohio
SAP shuffles execs
to chase cloud
success
AT&T adds 61˘
"Mobility
Administrative Fee"
for users
Microsoft caves to
Google, pulls
YouTube app from
WinPhone Store
Amazon expands
Appstore reach,
gives devs more
user data
Now it gets
serious: Fracking
could RUIN BEER
Reports: New Xbox
could DOOM
second-hand games
market
Industry execs:
Network admins are
an endangered
species
Slashdot
AMD Launches New
Mobile APU Lineup,
Kabini Gets Tested
How To Hack
Twitter"s
Two-Factor
Authentication
African Soil Mapped
For the Very First
Time
BeagleBone Black
Ships With New
Linux 3.8 Kernel
Google Releases
Glass Factory
System Image,
Rooted Bootloader
White House: Use
Metric If You Want,
We Don"t Care
A Snapshot of the
Inside of an Atom
WHO: Intellectual
Property Claims
Hindering Research
On Deadly Novel
Coronavirus
Google Plans
Wireless Networks
In Emerging Markets
Intel Claims
Haswell
Architecture Offers
50% Longer Battery
Life vs. Ivy Bridge
View Blog
Miscellaneous
by goldie on Tue 5th May 6am



import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
import java.io.*;
import java.util.Properties;
public class SENDMAIL
{


public void sendMail(String mailServer, String from, String to,
String subject, String messageBody,
String[] attachments) throws
MessagingException, AddressException
{
// Setup mail server
Properties props = System.getProperties();
props.put("mail.smtp.host", mailServer);

// Get a mail session
Session session = Session.getDefaultInstance(props, null);

// Define a new mail message
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
message.setSubject(subject);

// Create a message part to represent the body text
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setText(messageBody);

//use a MimeMultipart as we need to handle the file attachments
Multipart multipart = new MimeMultipart();

//add the message body to the mime message
multipart.addBodyPart(messageBodyPart);

// add any file attachments to the message
addAtachments(attachments, multipart);

// Put all message parts in the message
message.setContent(multipart);

// Send the message
Transport.send(message);


}

protected void addAtachments(String[] attachments, Multipart multipart)
throws MessagingException, AddressException
{
for(int i = 0; i<= attachments.length -1; i++)
{
String filename = attachments[i];
MimeBodyPart attachmentBodyPart = new MimeBodyPart();

//use a JAF FileDataSource as it does MIME type detection
DataSource source = new FileDataSource(filename);
attachmentBodyPart.setDataHandler(new DataHandler(source));

//assume that the filename you want to send is the same as the
//actual file name - could alter this to remove the file path
attachmentBodyPart.setFileName(filename);

//add the attachment
multipart.addBodyPart(attachmentBodyPart);
}
}

public static void main(String[] args)
{
try
{
SENDMAIL MAIL = new SENDMAIL();
String server="pop3.gmail.com";
String from="username@gmail.com";
String to = "other user name@gmail.com";
String subject="Test";
String message="Testing";
String[] filenames =
{"c:/somefile.txt"};

MAIL.sendMail(server,from,to,subject,message,filenames);
}
catch(Exception e)
{
e.printStackTrace(System.out);
}

}
}
i want to send mail using this code but i getting exception like this.
avax.mail.MessagingException: Unknown SMTP host: pop3.gmail.com;
nested exception is:
java.net.UnknownHostException: pop3.gmail.com
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1543)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:453)
at javax.mail.Service.connect(Service.java:291)
at javax.mail.Service.connect(Service.java:172)
at javax.mail.Service.connect(Service.java:121)
at javax.mail.Transport.send0(Transport.java:190)
at javax.mail.Transport.send(Transport.java:120)
at SENDMAIL.sendMail(SENDMAIL.java:46)
at SENDMAIL.main(SENDMAIL.java:85)
Caused by: java.net.UnknownHostException: pop3.gmail.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:267)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:227)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1511)
... 8 more
i have taken code from this siite only plz suggest me how to remove this exception.
thanks in advance.
Miscellaneous blogs goldie's blog
Comments:
Domuk
2009-05-13 18:46:28
You went ahead and made a blog post without even reading what the exception was?
Anonymous
2009-07-16 12:23:14
http://www.watches-space.com/Panerai-Watches.html Panerai Watches
http://www.watches-space.com/Piaget-Watches.html Piaget-Watches
Anonymous
2011-07-23 02:21:19
Do you want to buy your personalized jerseys? There are three kinds of cheap authentic nba jerseys are arrival for you to choose. One is cheap MLB jerseys,the other two are wholesale nfl jerseys and wholesale nba jerseys. NFL throwback jerseys and authentic mlb jerseys are playing an important part in our classmates' everyday lives. They say that cheap nfl throwback jerseys could make them perfect. Either when they are playing balls or just in their everyday lives, NFL jerseys wholesale could make them more comfortable. Jose, who is my best friend, says that cheap nfl jerseys and nfl jerseys for cheap could save their family more, all their family love to share discount authentic jerseys online. Wholesale jerseys and cheap jerseys for sale online could save us more than buying from retail store.
Anonymous
2012-07-27 09:38:49
Twenty-first Century world, popular culture is everywhere, Ray Ban sunglasses 3025 is one of the classic, whether it is a glamorous star, or ordinary grassroots, Ray-Ban culture deeply imprinted in countless metrosexual fashionista heart, become a fantastic legend Ray-Ban is really a strange glasses, in addition to it has one glasses can guarantee 99% of the person wearing it will have 99 people are very stylish? Be numerous star pet for a long time Ray-Ban retro glasses recently this year set off a fashion tide, more vivid colors and shapes to provide you with more character options. Now all the Ray Ban sunglasses sale are in discount, you will share low price but high quality Replica Ray Ban sunglasses here! Why not buy now!
Anonymous
2012-09-17 11:40:14
Wham bam thank you, ma'am, my quesotnis are answered!
Anonymous
2012-09-18 10:42:22
k2sECt <a href="http://vdbtxufygmgi.com/">vdbtxufygmgi</a>
Anonymous
2012-09-19 01:10:36
Xk14sD , bdtdivtugnsb, [link=http://tjfrjuwrcuzx.com/]tjfrjuwrcuzx[/link], http://cykvzeyesbqs.com/
Anonymous
2012-09-21 11:31:32
http://www.multipleinsurquotes.com/ health insurance quotes 8]] http://www.insuranceratesinminutes.com/ car insurance online eyuyyk
Anonymous
2012-09-23 13:18:28
http://www.multipleinsurquotes.com/ life insurance quotes 420 http://www.thebestinsurancequote.net/ auto insurance quote xwgdf
Anonymous
2012-09-25 08:28:25
http://www.guidetolifeinsurance.net/ life insurance nyo http://www.freeflightcomparison.com/ flight cheap :[[[
Anonymous
2012-09-27 10:44:22
http://www.guidetolifeinsurance.net/ life insurance cost 48837 http://www.insuranceratesinminutes.com/ eastwood auto insurance gvzic
Anonymous
2012-10-05 11:06:45
http://www.findedmedsonline.com/ purchase viagra %-(( http://www.findacidrefluxtreatment.com/ nasonex nexium propecia yasmin 913711
Anonymous
2012-10-07 09:22:10
http://www.findedmedsonline.com/ viagra 8-]]] http://www.mennshelse.com/ online store cialis ryd
Anonymous
2012-10-09 13:37:38
http://www.traiterlade.com/ viagra rddzw http://www.mennshelse.com/ cialis qzhc
Anonymous
2012-10-11 10:02:45
http://www.mennshelse.com/ cialis 495194 http://www.edbehandling.com/ genericviagra 345
Anonymous
2012-10-12 13:30:36
http://dockpartner.com/ auto owners insurance ydu http://www.getcheapflightsfast.com/ cheap flights 295553
Anonymous
2012-10-14 09:59:23
http://www.bestcreditcardoffers4you.com/ credit card processing ylad http://www.getcheapflightsfast.com/ cheap flights >:-]]
Anonymous
2012-10-16 09:58:36
http://dockpartner.com/ insurance auto 8-[[ http://www.bestcreditcardoffers4you.com/ best credit cards 48394
Anonymous
2012-10-19 19:29:21
http://www.floridacarinsurers.net/ classic car insurance 449097 http://www.getcheapflightsfast.com/ cheap air flights %-((
Anonymous
2013-01-09 13:08:55
http://www.nycarinsurquotes.com/ cheap california auto insurance ppkasv http://www.txautoinsurquotes.com/ auto insurance quotes tx 039 http://www.mylifeinsuranceguide.net/ life insurance companies 011297
Anonymous
2013-01-21 13:23:18
http://www.autoinsurers4u.com/ cheapest car insurance >:-]]] http://www.onlinecheapautoinsurance.net/ online auto insurance 8-]] http://www.aboutcarinsurancerates.com/ car insurance sgqqmr
Anonymous
2013-01-31 02:35:31
http://www.quotesfromtopinsurers.com/ florida auto insurance 124886 http://www.lifeinsuranceshopping.net/ permanent life insurance 6872 http://www.carinsuranceiseasy.com/ car insurance :-OO http://www.treatpatternhairloss.com/ propecia 227
Anonymous
2013-02-09 10:11:36
http://www.acnegoodbye.net/ accutane :PPP http://www.bestantibiotic.net/ amoxicillin 364 http://www.mycarinsurquote.com/ car insurance quote 008 http://www.treatmentsguide.net/ acyclovir or valtrex 0416
Anonymous
2013-02-09 10:11:37
http://www.heartburnreliefonline.net/ nexium yqptj http://www.mycarinsurquote.com/ buy car insurance online %-)) http://www.greatcarinsurquotes.com/ auto insurance :P
Anonymous
2013-02-15 18:47:08
http://www.herpesmeds.net/ valtrex buy cheap mpbgel http://www.menshealthprice.com/ buy cialis wtsla http://www.cheapestcarproviders.com/ cheapest car insurance 39412
Anonymous
2013-02-15 18:47:16
http://www.heartburnreliefonline.net/ nexium liscyf http://www.cheapcarinsuronline.com/ cheap car insurance kxbv http://www.edgenericmeds.net/ order cialis xremm
Anonymous
2013-02-22 07:54:59
http://www.lovedecoo.com/ buy viagra >:] http://www.stpredevelopment.com/ prednisone online =] http://roundrockdirectory.com/ car insurence gfkahh
Anonymous
2013-02-25 14:02:51
http://www.besttreatmentfored.com/ best buy generic viagra >:[ http://www.fwcollaborative.org/ new jersey car insurance 8[ http://www.bestcarinsurrates.com/ car insureance :PPP
Anonymous
2013-03-01 11:04:20
http://www.msgvarsitysummerstars.com/ a auto insurance kvufdj http://www.treatallergicdisorder.com/ prednisone no prescription =( http://www.mom-threw-out.com/ insurance auto auctions =-((
Anonymous
2013-03-01 11:04:21
http://jonnymugwump.com/ insurance auto auctions 8-PPP http://www.cheapsildenafilonline.com/ sildenafil =-[[[ http://www.clemsondsp.org/ discount car insurance jtlldw
Anonymous
2013-03-11 10:29:26
http://www.besttreatmentfored.com/ viagra 16400 http://www.rutgersgsnb.org/ accutane online %P http://cumberlandtwppolice.com/ auto insurance quotes 55636
Anonymous
2013-03-15 12:52:21
http://www.orderedpillsonline.com/ viagra and levitra >:-]]] http://www.thizlinux.org/ free car insurance quotes 351 http://www.liensmedias.com/ buy car insurance online >:(
Anonymous
2013-03-20 20:03:19
http://www.discoveronlinecolleges.net/ top online colleges xwsklm http://www.carinsurcompanies.com/ car insurance cpq http://www.onlineschoolsoffer.net/ online health care schools 672
Anonymous
2013-03-22 18:34:52
http://www.bobhammack.com/ buy cialis =OO http://compareonlineclasses.com/ online classes zdhsd http://www.findbestinsurquotes.com/ auto insurance quotes 670
Anonymous
2013-03-22 18:34:52
http://www.salmongonewild.com/ viagra for sale 1527 http://www.spamcarnival.com/ cialis online khihk http://www.highestqualityedpills.com/ viagra and levitra pxxqs
Anonymous
2013-04-13 16:42:43
http://www.medstabs4you.com/ price of cialis oeuc http://www.simondonconference.org/ online car insurance 959240 http://www.locatemedsonline.com/ viagra pjqwfc http://www.getyourquotesonline.com/ car insurance quotes 0461 http://www.cheapinsurdealsfast.com/ cheap auto insurance tru http://www.topinsurdealsonline.com/ car insurance quotes 417 http://www.stickfigurecat.com/ inexpensive car insurance rnq
Anonymous
2013-04-18 12:48:02
http://www.thetrumpwatch.com/ discount car insurance 794940 http://www.usadospuntocero.com/ auto owners insurance fxz http://www.comparecarquotesonline.com/ car insurance quotes 900 http://www.carinsurcompanies.com/ car insurance 8D http://www.insurcomparisonservice.com/ car insurance quotes :DDD http://www.shopforedtabs.com/ purchase viagra 6570 http://www.sorethumbsblog.com/ infinity auto insurance 8-P
Anonymous
2013-04-22 10:23:37
http://www.tratamientodelaed.es/ Cialis =-((( http://www.medspricechart.com/ buy viagra >:-((( http://getinsurlist.com/ cheap car insurance 206 http://www.shopforedtabs.com/ buy pfizer viagra hdkvst http://www.topinsurdealsonline.com/ new jersey car insurance =(( http://www.mdicamentsenligne.fr/ cialis 8]]
Anonymous
2013-05-06 14:09:52
http://www.insurcomparisonservice.com/ car insurance quotes 9890 http://www.cheapinsurdealsfast.com/ cheap auto insurance mihp http://www.getyourquotesonline.com/ auto insurance rates 07994 http://www.carinsurcompanies.net/ cheap car insurance fttqbo http://www.edmedsonline4you.com/ cialis 2582 http://www.listofcarquotes.com/ insurance auto auctions 322333 http://www.topinsurdealsonline.com/ car insurance quotes %D
Anonymous
2013-05-13 12:41:22
http://edpricesonline.com/ buy viagra >:PP http://www.accesstomedssavings.com/ prednisone tisy http://gethairback.net/ propecia 889337 http://www.youredmedsinfo.com/ cialis online >:P http://www.onlinecollegeseasily.com/ online colleges 8-))) http://www.mdicamentsenligne.fr/ cialis %-[[[ http://www.topinsurdealsonline.com/ car insurance quotes :-((
Anonymous
2013-05-16 19:35:53
http://edpricesonline.com/ viagra alternatives =-))) http://www.comfortedmeds.com/ cialis sales :-DDD http://www.accesstomedssavings.com/ prednisone %-]]] http://www.pricesforedmeds.com/ cheap levitra online vardenafil >:DDD http://www.insurcomparisonservice.com/ car insurance quotes 104
Anonymously add a comment: (or register here)
(registration is really fast and we send you no spam)

Related Blogs


First one by Action on Tue 12th Jan 10pm

Yaw, this is the first blog post, just to begin with something. Nice site
here, cool features like OSIDrive, and so on. However, strange that an
"OpenSource Institute" uses non-OpenSource softare to host its
site (Windows and IIS). It's not correct... I thought, they use Linux.
Action's blog

A Daily Profanity at dailyprofanity.com by bb on Mon 21st Dec 11am

For anyone who likes viz, and roger mellies profanisaurus.

There's a website called href="'http://dailyprofanity.com'">amusing daily profanity which dishes
up a humorous profanity every day via rss, twitter email and a few other
ways.

Rather rude words, but very funny in my opinion, although it might just be
a .uk thing!
bb's blog

Blog entry for Wed 25th Nov 7pm by hambone on Wed 25th Nov 7pm

wtf i can't do geek 12. I don't know what to do. i want to kill myself
becuz of this
hambone's blog

Blog entry for Mon 9th Nov 4am by haziman on Mon 9th Nov 4am

for all geekos out there...
haziman's blog

fuck you all!!!!!!!! by echmil on Sat 7th Nov 11pm

jag har tjock med tyngate trĺkigt-.-
echmil's blog

Bubble Graph by bb on Wed 11th Mar 12pm

I love this graph

href="http://www.osix.net:80/modules/folder/index.php?tid=28125&action=
vf">bubble graph


src="http://www.osix.net:80/modules/folder/index.php?tid=28125&action=v
f" border="0" />
bb's blog

My online resume! by ketan404 on Mon 9th Mar 8am

It is here
href="http://www.listoffreelancers.com/profiles/ketankulkarni">http://www.l
istoffreelancers.com/profiles/ketankulkarni


Simple and clean design. I like this website.

Ketan
ketan404's blog

Blog entry for Sun 8th Mar 3pm by macrocat on Sun 8th Mar 3pm

Another site with some challenges. Basically, I'm linking this to get a
measly five points ;O.

Hellbound
Hackers
macrocat's blog

Parapsychology - Fri 19th Dec 5am by Nightscript on Fri 19th Dec 5am

Yes i'm crazy but heres what ive been thinking about and it seems more
reasonable that a lot of reality. Note that this ties into
parapsychology/psychokinesis research.

Mind is not over matter. Thats the wrong state of thinking for sure.

Look, this is how i think i see it now, im enlightened or ignorant but such
is the world. Every time.

The thing ive come across is that when we think it is Mind over matter we
are convinced that we can directly influence an object or anything else.
Thats because we figure that our Mind is stronger than anything we might
put it up against. On a previous article i've written, I said that we would
need to find out where the Mind interacts with our brain in order to
initiate action.

ok gang here comes.

Its true what i said earlier..our Mind is most definitely NOT [over]
matter. And since we dont really have any method scientifically to find the
Mind itself can we not say that Mind IS matter? Yes we can, because if you
will also think back to my discussion of Mind and conciousness, i said that
we each exist in Our world and that everything can seemingly be based
around us. Though most folks interact to some degree with things that will
never have anything to do with them, the world I speak of is the one you
live in, walk and talk through each day. So our Mind is everything that our
world or our personal universe is made of. Mind is Matter.

With the fact or idea (whichever you prefer) that Mind is Matter, (not the
literal sense, like..grey matter...idiot.) um with that idea...we have a
seeming location of the Mind. We can say my mind is located in everything
around me, it makes up every aspect of the world I personally live in, and
my thoughts, my reactions, anything that must be initiated by energy from
my Mind comes from my environment and surrounding things. Everything I see,
everything I interact with from day to day, everything I come into any form
of contact with contributes to my Mind because it will flow through
thought. Therefore, once again, Mind is matter. Mind is composed of my
personal world.

We have a location for Mind now people. Now where oh where would we
consider an interaction point for the energies of Mind to be converted into
reactions and movements? Our body itself MUST be the interaction point of
Mind. Not only is it our brain, but since a stimulus has to occur to our
body, (message then goes to brain to create an effect on our senses) it has
to be our whole body. Our brain only tells us where the message is coming
from and it also does things like reflex...Go ahead and think of your brain
as being solely responsible for involuntary action. Mind guides our actions
through thought. The initial energy that is put into actions with any form
of thought behind it (this means exclude reflex) lets us see rather
plainly, or not if youre blind, that Mind is connected to the world through
our body.

So we know where we can possibly find our Mind, and we know now that its
connected to the corporeal world through our body. When we commit action
with the Mind, such as the entire goal of my research happens to be, we are
basically forced to use our body to carry it out. This is a plain fact of
life. So now the only thing that remains to be discovered is the way or
method to take our Mind's interaction with the body and move it directly to
what we wish to influence. To take the energy that we can call thought or
want to...and instead of having to use any tools..such as our body...use
the raw energy directly.

With the discovery (of sorts) of where Mind is, and where the interaction
point is...we can move to the final step and are well on the way to
experimentation.

Now I'd like to revisit something from earlier and maybe (expect recovering
of some areas) elaborate on a couple things.. First. I have a suspicion
that our brain is responsible for nothing more than involuntary actions.
Hear me out guys. Nothing you do is voluntary by the body. Which means all
of your muscles that move when you decide for them to move...are being
forced to. Involuntary action, on their part..because you want it to
happen.

I know that seems a little bit hard to grasp but here goes: You as a person
are not held within your brain. Your Mind holds your personality and all
your traits/flaws. So its partially safe to say that upon removal of Mind
from the body..that the body cannot be called - You. right? Since your Mind
exists in all things that make up your personal world, we can go deeper
insomuch as to say that it is, in fact, not part of the body. Which also
explains the need for an interaction point (the body) to the world. Are we
all still on the same page here?

So every interaction that begins in the Mind...which is anything
non-reflexive or voluntary...forces the body to commit what the action
dictates. If you wish to go running, then the action is initiated in the
Mind. "I THINK I'll go for a run." As you run the corporeal body
will fatigue and want to stop...but you press on for the sake of exercise,
you force the body to continue through willpower/thought. Tell me how the
brain is involved in that in any voluntary action?

The only thing it has done in this (or most any) instance is send the
signals to tell the muscles how to do the action you want. Running is
created in a sort of chain reaction. You spark the idea with Mind. The
energy is carried to the tools (brain), which, in turn signals secondary
tools (muscles) to begin working. Do you still understand?

Comments (helpful ones) are welcome. Ill add more to this later on.
-NS
Nightscript's blog

Why by auzzie on Thu 23rd Oct 2pm

No matter how you live your life, no matter how much right you try to bring
you always end up in pain?

i spent the past couple of months grieving about losing someone that was in
my heart and for some weird reason i happened to think of so many coding
ideas and produced proberbly some of the best code i have done in
years...... Idea's like a php based database backup system that basically
switched to PHP's SQLite system if the server was unable to connect to the
normal DB like MySQL or MSSQL etc
auzzie's blog

About Me
n:goldie
View my Profile

Recent Blogs
Blog entry for
Tue 5th May 6am
Tue 5th May 6am
using javamail
i am getting
excetion like
this
Tue 5th May 6am

Link To Me
My Rss Feed
My Blog
My Articles
My Profile


 

     
Your Ad Here
 
Copyright Open Source Institute, 2006