Wanna download javax.mail.* and javax.mail.internet.*

Hi all;
i'm a beginner in JSP and want help in downloading api classes for javax.mail.* and javax.mail.internet.*...would any1 like to tell me the URL for it and also after downloading, wat sequence would i follow to make these files run properly with my code.
would b waiting desperately for immediate response.
Regards.

Go to
http://java.sun.com
There are 5 drop List. Under the 2nd Drop List Search for JavaMail(TM) API 1.3. Now continue to download. U will download a file names javamail-1_3.zip. There are some jar files which u need to extract and add to ur classpath settings.
Not use the following code to send a simple SMTP Mail.
//Java specific imports
import javax.activation.FileDataSource;
import javax.activation.DataHandler;
import java.io.*;
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
public class SendMail
Session session = null;
public SendMail() throws Exception
Properties props = new Properties();
String strMailIPServer = "Your SMTP Server IP";
props.put("mail.smtp.host", strMailIPServer);
session = Session.getDefaultInstance(props, null);
public void sendMail(String strToAddress, String strFromAddress, String strSubject, String strMessage) throws Exception
try
long intTimeForTenMinutes = 60;
     MimeMessage objMimeMsg = new MimeMessage(session);
//Address objFromAddr = new InternetAddress(strFromAddress);
javax.mail.internet.InternetAddress objFromAddr = new javax.mail.internet.InternetAddress (strFromAddress);
Address[] objToAddr = InternetAddress.parse(strToAddress);
objMimeMsg.setFrom(objFromAddr);
objMimeMsg.setRecipients(Message.RecipientType.TO, objToAddr);
objMimeMsg.setSubject(strSubject);
objMimeMsg.setContent(strMessage, "text/html");
Transport.send(objMimeMsg);
catch (Exception mex)
throw mex;
All the Best!
Thanks and regards,
Pazhanikanthan. P

Similar Messages

  • I get a message IOS 6.1.2 failed verification because you are no longer connected to the internet .  i checked my connection to internet and its fine for mail and all other internet use only keep getting nowhere fast.

    i get a message IOS 6.1.2 failed verification because you are no longer connected to the internet .  i checked my connection to internet and its fine for mail and all other internet use only keep getting nowhere fast

    Just Power off your Iphone wait for 10 seconds and then power on again and got to settings and software update it will download the update once again and it will work fine.

  • Some email is downloaded into Mail and some mail is left on the POP server

    Hi All,
    I have a weird problem where some email is downloaded into Mail and some mail is not.
    If I log into our ISP's webmail system, there are a whole bunch of emails that are just sitting there. These emails have not ever been downloaded to Mail.
    I've tried to create a duplicate account, but Mail doesn't allow the same username & password in more than one account, which is kind of frustrating - I get an error stating that these user details are already in use.
    Our ISP says it's the client machine, as no one else in the office is having this issue.
    The connection doctor can connect to the servers and 30 or 40 emails are downloaded to Mail each day - just some emails don't.
    Does anyone have any suggestions?
    OSX 10.4.6
    Mail 2.0.7
    Any help would be much appreciated.
    Powerbook 12"   Mac OS X (10.4.6)   Mail 2.0.7

    Assuming the account is a POP type account, quit Mail first and using the Finder go to Home > Library > Mail > this POP account named folder (named by the user name and incoming mail server for the account) > MessageUidsAlreadyDownloaded2.
    Delete the MessageUidsAlreadyDownloaded2 file and empty the Trash.
    Launch Mail and a new MessageUidsAlreadyDownloaded2 file will be created automatically by Mail within the account named folder.
    If successful, any previously downloaded messages that remain on the server will be downloaded again along with any messages available on the server not yet downloaded by Mail.
    The reason you cannot create two accounts in Mail with the same user name and incoming mail server is based on the account and associated mailbox filing structure within the Mail folder at Home > Library > Mail. When creating an account in Mail, an account named folder is created at the first level within the Mail folder named by the user name and incoming mail server for the account.
    In addition, if this were possible I don't think it would resolve much by having identical accounts created in Mail with both accounts checking the incoming mail server at the same time.

  • How do I keep my Cox mail and MSN mail from all going into the same in box on Apple mail

    I have a Imac and Mac Book.  The Imac apple mail works great.  I also have a Mac Book.  The Apple  Mail is set up the same as the Imac.  The problem I have is that both Cox mail and MSN mail go into the same inbox on Apple Mail on the MacBook even though the accounts are separte.  From what I see, the settings are the same as the Imac. I tried to reinstall the apple mail.  No luck!  Should I try again.  Any ideas?

    Go to settings>iclod>then mark "no" in  "contacts" .

  • I have 2 questions regarding the iphone 5. 1 How do i get my yahoo mail set up. I tried the setting it up as both a yahoo mail and other mail. 2. I seem to have lost my notes on my iphone 5 but I have them on my ipad. How can I use cloud to sync my notes?

    I have 2 questions regarding the iphone 5. 1 How do i get my yahoo mail set up. I tried the setting it up as both a yahoo mail and other mail. 2. I seem to have lost my notes on my iphone 5 but I have them on my ipad. How can I use cloud to sync my notes?

    I will address your second question.
    First, make sure your iPhone and iPad have absolutely identical Apple IDs.  If they do, use that Apple ID in Settings > iCloud on your iPhone to select the "Notes" option.  Lo and behold, all your iCloud notes should appear on your iPhone.

  • How do I make Mac mail and iOS Mail sync to each other with a google apps (not traditional gmail) mail account?

    I have a google apps mail account in the form [email protected] I have successfully set up both my mac (A1342) Mail and my iPhone (5c) mail so I get my account on both devices. However, when I read an email on my iphone, it remains unread on my mac (and vice versa). But if I read an email on either, the copy in my Gmail inbox on the web is correctly changed to read. How do I set up my mac Mail and iOS mail so they interact with eachother?
    I am running OSX 10.9 and iOS 7.

    Set the account (on the Mac) as an Imap account, it seems as though it is currently set as POP.

  • Is it possible to highlight text in Apple Mail for incoming mails and outgoing mails?

    Is it possible to highlight text in Apple Mail for incoming mails and outgoing mails?

    If you mean that you wish to highlight messages from certain people or domain names, then if you select Preferences under 'Mail' (top left hand corner next to the Apple logo when you're in the mail application) and then select the right hand icon marked 'rules', then click on Add Rule and hopefully the rest is fairly self explanatory.
    Best of luck

  • My NEW MAIL and OLD MAIL emails get deleted at random

    At least twice in the last week, all of my NEW MAIL and OLD MAIL files were deleted. Some of these are very important files. I cannot work with a system that deletes my files, so that needs to be fixed. Also, I'd like to have ny deleted files restored.

    Firefox doesn't even do email, it's a web browser.
    If you are using Firefox to access your mail, you are using "web-mail". You need to seek support from your service provider or a forum for that service.
    If your problem is with Mozilla Thunderbird, see this forum for support.
    [http://www.mozillamessaging.com/en-US/support/] <br />
    or this one <br />
    [http://forums.mozillazine.org/viewforum.php?f=39]

  • Trash, Sent mail, and Junk mail folders do not work

    I just switched from my entourage email to mac's mail, and I noticed some problems that I cannot seem to figure out. I amm using IMAP based email, and had none of these problems on entourage, but I like the format of mail better, so i hope to get this resolved so I can keep using mail.
    1. Trash- When I delete an email it does not go to the trash folder like it did in entourage, but rather just disappears and I cannot find it anywhere. This is regardless of if I try and store it on the server or not. Either way, the deleted messages disappear.
    2. Sent mail- I may know why this is not working, at least I have heard a possible explanation. When I send an email, it will not go to the default sent-mail folder on my IMAP server, and so disappears unless I tell mail not to store them on the server (but there are obvious disadvantages to not having the mail stored on the server). I think this has to do with the fact that the sent mail folder on my IMAP client has to be set to sent-mail, while I hear Mail requires it to be just Sent.
    3. Junk mail- When I mark messages as junk mail, the program does not move them to the junk mail folder, neither in mail nor on the IMAP server.
    Now I have gone through as many of the options I can find to try and resolve this, but I have it all set up the same way I did in entourage, and cannot figure out why it is not working. Does it have to do with the naming of the folders for my IMAP service? Those seem to be default and unable to change. My Trash is labeled "trash", Sent mail is labeled "sent-mail", and junk mail is labeled "Junk".
    I appreciate any help.

    1. When not stored on the server, the account's Trash mailbox should be located under the Trash icon in the mailboxes drawer if "Move deleted messages to the Trash mailbox" is selected under the Mailbox Behaviors tab for the account preferences.
    If you have this selected, using the Finder go to Home > Library > Mail > Mailboxes. Within the Mailboxes folder should be a folder named
    Deleted Messages (name of your IMAP account in parenthesis).mbox
    Confirm the folder includes the .mbox extension.
    2. When you select "Store sent messages on the server", select your IMAP account's Sent mailbox under your IMAP account's icon in the mailboxes drawer which is sent-mail and at the menu bar, go to Mailbox > Use This Mailbox For and select Sent.
    3. Do you have Junk Mail set to Automatic?

  • Problems Compiling javax.servlet and javax.servlet.http

    When I try to compile a program that imports both javax.servlet and javax.servlet.http, the compiler keeps telling me that "package javax.servlet does not exist"... I have place the javax.servlet packages in the src.zip and in the src folder but i dont understand why the compiler isnt picking them up. Maybe I did something wrong ... could someone help please

    Try to compile vith the option "-classpath /your/path/to/servlet.jar"

  • Not able to log out of Yahoo mail and AOL mail

    This started happening about two days ago. I am able to log into my Yahoo mail and Aol mail accounts but I cannot sign out.

    Please post ADF questions to the JDeveloper forum. ADF is a component of JDeveloper and all the experts in ADF are in the JDeveloper forum.
    -steve-

  • I tried to send too large an attachment using mail,and now mail is hung up trying to send any message.  How do I reset mail?

    I tried to send too large an attachment using mail,and now mail is hung up trying to send any message.  How do I reset mail?

    It will time out, if it hasn't already. Delete the message from the Outbox.

  • Apple Mail and IOS mail client's auto configuration

    Good morning,
    Does any kind of documentation exist, anywhere, of how Apple Mail and IOS does autodiscover (how they handle it) and which XML format does it require for non Exchange accounts to be autoconfigured (an IMAP account with SSL and SMTP SSL too?.
    Best regards,

    Good morning Eric,
    Thank you so much for your answer. Básically the answer I'm trying to get is how to manage for autoconfigure Apple Mail and iOS Mail automatically with a not "so known" email provider such us Hotmail, Yahoo, Gmail, like can be Sarenet (www.sarenet.es). I mean which kind of info should an XML or DNS SRV record contain in order to achieve this goal?. My answer requirement is far more specific that yours. Anyway thanks a lot as said before .
    Regards,

  • Upgrading to Windows 8 - how do I save e-mails and e-mail address books?

    Converting from Windows XP to Windows 8 wipes out all files and programs. How do I save my e-mails and e-mail address books that are running on Thunderbird?

    You need to save and then reinstate your Thunderbird profile.
    https://support.mozilla.org/en-US/kb/profiles-tb
    I should point out that Firefox has a similar arrangement, with its own profile, so you can preserve your Firefox settings too.
    https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data

  • Windows Live Mail and Mac Mail

    Hi,
    I have Windows Live Mail up and running nicely through Mac Mail (I have just switched from PC to Mac). However I'm wondering what's the right way to sync them fully. I mostly access email through Mac Mail now but whenever I need to access Hotmail through the web, all the msgs I have read or deleted earlier are still showing as unread.
    Any help would be much appreciated.
    Thanks,
    Helen

    I see no one else has answered so I’ll try to get the ball rolling and maybe others will chime in.
    First, I am not familiar with Windows Live Mail so I can’t guarantee to give directions to get you there from here but I’m sure there is a way.  Some Googling found these paths:
    A tutorial on the process (transferring mail and contacts):
    https://www.youtube.com/watch?v=KpSQ3-DKxSc
    Uses https://convertmyemail.com/
    $20
    Also https://discussions.apple.com/thread/2536701 which points to
    http://www.windowslivemailconverter.com/mac/
    $50.
    That led me to “elm to mbox” where I found
    http://download.cnet.com/EML-to-MBOX-Converter/3000-2369_4-75999580.html
    $50.
    and
    http://www.emltombox.org/to-mac-mbox-converter.html
    $50

  • G-Mail and Apple Mail problems

    I have had tons of problems with my Mail app and Gmail. A window pops open and asks for my password and then does not have any effect on allowing retrieval from the server. Often times I cannot download my mail from gmail at all....have you had similar problems??
    OK....
    this gmail/mac mail problem caused me a ton of suffering.....but I think I have it figured out....
    I think the problem stems from the fact that if you use gmail through a browser and send messages, for example if you are away from your computer, then those sent messages eventually get stored as new conversations. When you return to using your mail app the messages you sent will appear in your inbox as new mail, sent by you.
    I am not quite sure how the next step happens but after a lot of fidgeting what I found was that, after erasing my inbox in gmail(this is probably not necessary), after backing up the messages, I went into gmail's preferences and in POP and Forwarding I selected allow POP for all mail. What happened next was unusual....even though the entire mail box on the gmail server was empty.....when Mail started to get the messages it showed that there were over 300 messages to download. The interesting thing was that most of these messages were sent by me to someone else and had an attachment.
    After downloading and erasing all these old messages that were causing this case of Mail constipation I went into Mail preferences>>>accounts>>>advanced and clicked the box "remove copy from server after retrieving message" option and then "right away"in the pull down menu. I also clicked the "remove now" button to clear all previously downloaded messages from the server. I noticed on the Mail app that this happened almost immediatly as Mail went about removing all these old messages from the server.
    Since this I have not had any problems. I believe that the problem lies somwhere in the way that Gmail creates "conversations". Somehow sent mail gets spirited away in some nook on the server and accumulates, eventually causing a case of constipation. These backed up messages somehow cause the Mail app to not be able to retrieve new messages. If you find this happening do as I have and see what effect it has. Allow your Mail app to down load all the messages it "sees" and keep an eye on what they are(this may take several hours). Often they will be old and previously sent/downloaded mail. Erase them and make sure that they are erased from the server using the advanced option in Mail preferences.
    Maybe someone with a more technical background can explain this phenomenon better.
    Good Luck.

    "A search for Mail AND Gmail in these forums (or a
    search for just Gmail restricted to this particular
    forum) could have saved you a lot of time and would
    have provided you a better understanding of what's
    going on (note, it should be "Gmail", not "G-Mail")"
    I wonder what the purpose of this reply of yours could be. If it is that something I've said has upset you, I don't know what it could be and I really wouldn't care if it wasn't because your statements could mislead other users into misunderstanding how Gmail actually works. There is nothing in the post that originated this thread that has not already been discussed recently in this forum, except for false assumptions that I'll have to clarify now.
    First, choosing a setting in Preferences... > Accounts > Advanced > Remove copy from server after retrieving message has no effect on a Gmail account, absolutely none, no matter whether you choose "Right away", or "After a month" or anything else. Yes, Mail will no longer see those messages, but neither would it had you chosen to leave the messages on the server instead. The messages are simply no longer available there for any POP mail client after having downloaded them. The messages are still on the server, however, and you can read them with a web browser. That's how Gmail works.
    Second, clicking Remove now in that same preference pane in Mail has no effect on a Gmail account either, absolutely none. The reason this doesn't work is the same as before. The messages on the server have been hidden by Gmail after downloading them and POP mail clients can no longer see them, nor delete them, nor do anything with them, until you go to the Gmail web site and configure your mail account to make all messages still there available for POP download again.
    Third, the only way to get a message deleted from the server with a Gmail account is to log into your account with a web browser. Now, if you want your messages to be deleted immediately after being downloaded by Mail, you can accomplish that by choosing the appropriate setting in the web account settings page -- and you are limited to the options provided there. Mail's own settings will continue to be completely and utterly ignored by Gmail.
    Now, had you searched these forums as I suggested or just followed the links I provided in my first reply would certainly have saved both you and me and probably anybody else that chose to read this thread a lot of time.
    iMac G5 17" (iSight)   Mac OS X (10.4.4)  

Maybe you are looking for

  • Oracle OUTER JOIN on more than one table

    Hi! Friends, please help with this urgent problem: How can an outer join be written on more than one table? An SQL Server query: SELECT * from a INNER JOIN b on a.id = b.id LEFT OUTER JOIN c ON c.id = a.id AND c.id = b.id works fine with SQL SERVER B

  • Sync AppleTV with a second computer

    I set up AppleTV with an iBook and everything worked beautifully. I bought a second laptop, which I'd now like to be the computer that syncs with ATV. Unfortunately, I can only make it stream to ATV at this point. What do I have to do to make my newe

  • Unable to install Pages on to my iMac

    I have a iMac with X Lion 10.7.5 OS and am unable to install Pages. It asks that I install the latest OS upgrade which I am unable to do until I upgrade my memory. I have a purchased copy of Pages (using it on my Mac Book Pro) Is it possible to insta

  • Interactive Mobile Prototyping in Photoshop?

    I'm designing a mobile app and need to build in interactive prototype.  I ran accross this PS plugin/app -  http://www.getcomposite.com/.  Looks pretty great and maybe exactly what I need.  Does anyone have experience with this? I *prefer* to use pho

  • Currency with out commas

    HI, Iam passing to table 1000.00 amount. At table level it is taking as 1,000.00 and data type is CURR. I need to remove "1,000.00" and save as "1000.00" at table level.