No idea about javamail

i found a code using google to send a mail
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
public class SmtpGmail {
   public static void main(String[] args) {
     SmtpSsl smtp = null;
     // gmail username - CHANGE THIS
     String username = "[email protected]";
     // gmail password - CHANGE THIS
     String password = "password";
     // address to send mail to - CHANGE THIS
     String to = "[email protected]";
     try {     
       // create a new SmtpSsl instance connecting securely via port 465 using implicit SSL
       smtp = new SmtpSsl("smtp.gmail.com",465);
       // establish secure connection
       smtp.connect();
       // login using gmail account details
       smtp.login(username,password);
       // create new email message
       EmailMessage message = new EmailMessage();
       message.setTo(to);
       message.setFrom(username);
       message.setSubject("Sending email via Gmail SMTP");
       message.setBody("This is the body of the message");
       // send message
       smtp.send(message);
       // disconnect     
       smtp.disconnect();     
     } catch(Exception e) {
       // capture any exception and print to console
       e.printStackTrace();
SmtpGmail.java:9: cannot find symbol
symbol  : class SmtpSsl
location: class SmtpGmail
     SmtpSsl smtp = null;
     ^
SmtpGmail.java:21: cannot find symbol
symbol  : class SmtpSsl
location: class SmtpGmail
       smtp = new SmtpSsl("smtp.gmail.com",465);
                  ^
SmtpGmail.java:30: cannot find symbol
symbol  : class EmailMessage
location: class SmtpGmail
       EmailMessage message = new EmailMessage();
       ^
SmtpGmail.java:30: cannot find symbol
symbol  : class EmailMessage
location: class SmtpGmail
       EmailMessage message = new EmailMessage();
                                  ^
4 errorsthis error is shown....is it because i couldnt add properly in environment variable??
my classpath of user variable looks like this
.;C:\javamail\javamail\mail.jar;C:\javamail\jaf\activation.jar;C:\javamail\javamail\lib\dsn.jar;C:\javamail\javamail\lib\imap.jar;C:\javamail\javamail\lib\mailapi.jar;
C:\javamail\javamail\lib\pop3.jar;C:\javamail\javamail\lib\smtp.jar

I don't know what API you're using but it's not JavaMail.
The JavaMail FAQ will show you how to connect to Gmail, and will point you
to the source code of example programs you can use.

Similar Messages

  • I just got a notice to update my firefox to 4.0 and when I downloaded the new software it indicated: that I can't open the application "Firefox" because it is not supported on this architecture. Any ideas about what might be wrong and how to fix it?

    I just got a notice to update my firefox to 4.0 and when I downloaded the new software it indicated: that I can't open the application "Firefox" because it is not supported on this architecture. Any ideas about what might be wrong and how to fix it?

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
    If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html

  • Any idea about the pricing of the hardwares for Oracle 10g RAC?

    Hi,
    If I go for 2 nodes RAC using Dell servers and Disk array, any ideas about the prices? (just for the hardwares.)
    Thanks.
    Regards,
    Jason

    It's all about the shared disk(s).
    If you are only ever going to use two (2) nodes a SCSI JBOD solution is cheap. (practical too with ASM as the cluster filesystem / volume manager)
    More than 2 nodes, you step up to certified NFS, iSCSI or FC/AL connected storage. More expensive, faster, more flexible.
    The computers are the cheapest portion of the cost especially with multiple core multiple cpu 64bit linux based servers being so inexpensive.

  • Hey Dears, I was working with my Macbook pro 2011, then i have some flash light in the screen, so i shutdown the computer, when i try to open it again i had a black screen, so any one of you have any idea about what should i have to do ?

    Hey Dears, I was working with my Macbook pro 2011, then i have some flash light in the screen, so i shutdown the computer, when i try to open it again i had a black screen, so any one of you have any idea about what should i have to do ?

    Can you start Firefox in [[Safe mode]] ?
    You can also do a clean reinstall and download a fresh Firefox copy from http://www.mozilla.com/firefox/all.html and save the file to the desktop.
    Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
    It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    You can initially skip the step to create a new profile, that may not necessary for this issue.
    See http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • I am using PP 2014 CC and it and or Encoder keep crashing.. using iMac computer with Yosemite OS anyone have any ideas about this issue?

    I am using PP 2014 CC and it and or Encoder keep crashing.. using iMac computer with Yosemite OS anyone have any ideas about this issue?

    Hi,
    Please give this a try: Premiere Pro CC, CC 2014, or 2014.1 freezing on startup or crashing while working (Mac OS X 10.9, and later)
    Thanks,
    Rameez

  • HT4623 Am trying to download a ringtone to my iphone 5, but app button on itunes won't open when phone synced to PC. Anyone have ideas about this? Jimbo

    Am trying to download a ringtone to my iphone 5, but app button on itunes won't open when phone synced to PC. Anyone have ideas about this? Jimbo

    Did you try reinstalling the app and contacting the developer (there should be a contact link on the app's description page in the store) ? If you don't get a reply from the developer then you could try
    'report a problem' link from the purchase history on your computer's iTunes instead of on your iPad : log into your account on your computer's iTunes via Store > View My Account and you should then see a Purchase History section with a 'see all' link to the right of it ; click on that and you should see a list of your purchases ; find that song and use the 'Report a Problem' link (iTunes support should reply within, I think, 24 to 48 hours).
    Some people have had a problem with the 'report a problem' link (it's been taking people to this site on a browser instead of showing a form in iTunes) - if it does that to you then try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page.

  • HT1386 Sry for disturbing, but i would to ask that how to overcome the problem of synchronising ? Itune showing me that the sync session is failed to start with my Ipad mini. Any ideas about what is going on ?

    Sry for disturbing, but i would to ask that how to overcome the problem of synchronising ? Itune showing me that the sync session is failed to start with my Ipad mini. Any ideas about what is going on ?

    What are you trying to sync?
    I see you are on ios 7.
    I also had upgraded my iPad Mini to ios 7 & then the 1st time I tried to open a Numbers file that was set up to sync w my MacBookPro, I got a warning that I would not be able to sync it any more w my Mac until I upgraded to Mavericks.
    So if you are trying to sync Numbers, Pages or Keynote files between your iPad mini in ios 7 and a Mac that hasn't been upgraded to Mavericks that could be the problem.
    I was very shocked to get that message since I bought Numbers on the iPad so that I could have a particular file on both devices & keep them synced. I had no clue when I upgraded to ios 7 on the iPad Mini that it would make it so the files in the iWorks apps woudln't sync any more.
    So I finally decided to go ahead & upgrade to Mavericks after carefully preparing & updating other software so that it would work w Mavericks. But I got error messages so haven't even been able to download Mavericks & now having 2nd thoughts about doing so.
    iPad mini ios 7
    MacBookPro Mid 2012 Mountain Lion
    iphone 4S ios 6

  • I don't have clean ideas about Mac Pro and FCP in RT

    Hi, I hope you can clarify my ideas about editing in RT.
    I will purchase a HDV camera and I'd like to work in RT with FCP and Mac Pro.
    Many people tell me I don't need any additional card and even I don't need RAID. Can you tell me if I can work in RT with FCP, Mac Pro and 4GIGs RAM only?
    thanks

    When I have to export the film from Timeline will I have to do rendering?
    RT editing in FCP, for the most part simply means that there are certain things you can see happen in the timeline without rendering... a certain number of simultaneous streams or tracks, certain transitions/effects/titles etc.
    How much you can do RT is determined by a number of factors... the speed/power of your computer and drives, the video format your cutting... you'll get less cutting HD than you will cutting HDV or DV25. With the type of timeline you're describing you shouldn't have any trouble seeing what you're cutting RT.
    However, regardless of how much you see RT, any effects, transitions etc. have to be rendered in order to output or export. In other words, even with DV footage, unless you've got a straight cut timeline with no titles or effects, you're always looking at at least some render time to get things finished. And as David has said, HDV also requires conforming (the whole timeline, not just effects) which, depending on the length of your show can take some time.
    rh

  • I want to open a radio file that is .rm.  I get a message that says I need additional Quicktime software, but I cannot locate what I need to download on the QT website.  Anyone got ideas about how I can open this file?

    I want to open a radio file that is .rm.  I get a message that says I need additional Quicktime software, but I cannot locate what I need to download on the QT website.  Anyone got ideas about how I can open this file?

    Hi bert,
    the ".rm" extension is created by 'Real Media' application.
    The easiest way to use it is to install the 'Real Media' player:
    1. RealPlayer BBC.app
    2. RealPlayer 12.app
    I have both installed & use them sometimes.
    (The 'BBC' wersion doesn't have any adverts with-in the app.)

  • Does anyone have an idea about wireless mirroring availability(without any hack) for iPad 1?

    Does anyone have an idea about wireless mirroring availability(without any hack) for iPad 1?

    Yes.  It's quite simple.  It can't be done.
    Sorry.

  • Wanted brief idea about posting date, document date, entry date

    Hi guyz!
    basically am an tech consultant. But wanted to have brief idea about the following business process. scenario is like this:
    in inventory management, we are doing some inter facility transfer. i.e., for a particular plant, we are having multiple storage locations. so due tosome reasons, we are transfering stock from one storage location to another storage location. so in this context can anybody say what are the followings:
    1. posting date
    2. document date
    3. entry date
    waiting for proper response.
    manas

    Hi Manas,
    The Document Date is the date in which the business transaction for the Documente(e.g., a transfer of posting) took place. The document date is the date on which the original document was issued.
    The document date can, for example, refer to the creation date of the delivery note issued by the vendor or the internal goods receipt slip.
    The Posting Date determines the posting period and defines in which fiscal period a document will post (regardless of the Document or Entry date). It is the date which is used when entering the document in Financial Accounting or Controlling. The periods that are permitted for posting are determined by Accounting Services. This is the date that G/L Account Balances are updated.
    The fiscal year and the period for which an update of the accounts specified in the document or cost elements is made, are derived from the posting date. The Posting Date will override the Fiscal Period entered on a document if they are different.
    When entering documents, the system checks whether the posting date entered is allowed by means of the posting period permitted.
    The posting date can differ from both the entry date (day of entry into the system) and the document date (day of creation of the original document).
    The Entry Date is the date the transaction was actually "permanently entered" into R/3.
    Note: It is possible that an invoice was issued with a Document Date of 6/15/98, entered into R/3 on 7/15/98 (Entry Date) with a Posting Date of 6/30/98 (to post the Document in the previous fiscal year). Many times, all three of these dates are the same.
    Thanks,
    Susmitha.
    Mark helpful answers.

  • Any Ideas about 1.2 fix? (Scrambled Screen, etc.)

    Anyone have any ideas about how to fix the problems with ipod software 1.2? Does anyone know how to fix the scrambled screen problem or the locking up of the screen, after two months of having to deal with the problem) (iPod software version 1.2 was released on September 12) (other than reverting back to 1.1.2)
    ...yeah, i didn't think so.

    yeah, many of us would like apple to fix this problem. I've stopped buying tv shows off the iTunes store, because I can't get the videos on my iPod without the update. Feh!

  • HT5071 hello..can anyone get me an idea about iBooks Author in iPad??

    I am struggling about distribution and publishing of my iBook with in ipads..
    can anyone plz get me an idea about this?

    Hi Mahesh,
    You can click preview button in the top left of your iBooks Author application screen. Do the following before you click preview.
    1. Check your iPad has 'iBooks' app installted, if not install from iTune Store it is free.
    2. Open iBooks App before you click Preview option.
    For more details please refer below links.
    For preview: http://support.apple.com/kb/PH2807
    For exporting: http://support.apple.com/kb/PH2807http://support.apple.com/kb/PH2809?viewlocale=en_US

  • After updating to Maverick, Photoshop cs6 is freezing up repetitively. The "initializing text tool" progress bar seems to be popping up out of nowhere. Does anybody have any ideas about why this is happening?

    After updating to Maverick, Photoshop cs6 is freezing up repetitively. Does anybody have any ideas about why this is happening?

    After updating to Maverick, Photoshop cs6 is freezing up repetitively. Does anybody have any ideas about why this is happening?

  • My Itunes opens on my PC but the songs won't play, I have no idea about what to do?

    My Itunes opens on my PC but the songs won't play.  I have no idea about what to do to resolve the issue.  I appreciate any help.  It is an HP computer about a year old running Windows 7. 

    Try forgetting the network, reboot your iPad and then try joining the network again.
    Settings>WiFi>Your network name>Forget this network. Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.
    Go back to Settings>WiFi>Your network name>Enter your password>Tap Join.
    If that doesn't work, reset network settings. Settings>General>Reset>Reset Network Settings. Reboot the iPad again. Go back to Settings>WiFi>Your network name>Enter your password>Tap join.

Maybe you are looking for

  • It doesn't open new tabs or windows when I click on then. it gives a problem loading page quite a bit, what's wrong?

    When i open it it takes a long time to open, when I go to mail, or other places. it opens a Server not found Firefox can't find the server at us.mg5.mail.yahoo.com Check the address for typing errors such as ww.example.com instead of www.example.com

  • Not getting saved in the calender

    HI, I have changed  some work schedule in the calender say for the month of October and it showed "work schedule generated  for 10 2011 " once i come out and generate a report its not displaying proper report. and if i go back and see the calender fo

  • Cycle Through Applications

    Is it possible to cycle through the remote computers applications> (some special key command perhaps) as whenever I do CMD TAB at my end it cycles through my computers applications, not the remote computers applications.

  • Lightroom Photo Transfer Question

    I am transferring photos to a new computer.  All files have been transferred other than the Lightroom file.  It is approximately 15 gigs. My question is whether or not it should be transferred.  Does this contain pictures or is it simply comprised of

  • InDesign interactive question...

    I have encountered a problem recently with InDesign interactive that I wasn't aware of up till now. When I position objects on the screen, that have motion applied, if they are placed in the same position on another page with no motion applied, they