New To JavaMail

I got a simple java code (from Google) to send mail using javamail API.
But i didn't get the use of following two lines of code.please describe it briefly
Properties prop=System.getProperties();
prop.put ("mail.smtp.host",host);
what is "mail.smtp.host" ?
can i change this value or not?
please please help me.THANKS IN ADVANCE.

Have you found the JavaMail FAQ and the many demo programs
included with JavaMail? Now's a good time to go look for them.
I'll wait....
what is "mail.smtp.host" ?It's the name of a property.
can i change this value or not?Not. You can, and should, change the value that this property is set to
(e.g. the "host" variable in your example).

Similar Messages

  • New to JavaMail API

    Hi all,
    I am new to JavaMail API. I'm running J2EE Application Server on my windows machine. I want to make my system a mail server. Please tell me what are the requirements? which software i need to install additionally. My professor told me to use sendmail_ but i want to use java technology. So please help me.
    Thanks! :)
    Sumit

    The JavaMail FAQ has pointers to some mail servers. Some of them will
    probably run on Windows.
    Installing and configuring a mail server, especially to make it secure, can
    be a significant task. It's probably more than you want to do to complete
    a homework assignment. :-)

  • New to JavaMail: sending via MS Outlook

    i was searching the forum for quite some time, i just couldn't find what i am looking for. sorry if similar question has been posted.
    all i want to do is:
    1) send an email via outlook, that means in my application i set all the parameters like recipient, subject, content and then i want outlook to start and send the e-mail
    2) i managed somehow with "cmd /c start mailto:" but it would be nice to send the mail automatically, not just open the dialog.
    3) i managed to send emails with the JavaMail API, but then the outgoing message is not stored in outlook.
    what do i need to do? i really appreciate any answers...
    thanks, steff

    thank you again and sorry for bothering you. what i am trying to tell you is, that i am not using/do not have a server. all i have is a normal ms office outlook (local client, there is no server behind that) ... to send the message i only make a smtp-connection to my internet service providers mail-server (like outlook does as well). but i am not interested in the isp folders.
    i had a close look at the examples you said (mover.java & folderlist.java) and again, there is this IMAP connecntion to A server.
    Am I completely wrong, or do i just don't understand it. i want to save messages local in my outlook (unfortunatelly no server). Could you make an example for me to understand?
    thanks again, stefan

  • New 2 javamail - pls help

    Hello everyone,
    I'm new to Java and have a project to do for school: setting up a webmail using Java.
    As I work on it, some errors appeared and I dont know their meaning or where to search their explanation:
    "The exception NoSuchProviderException is not handled"
    "Field type Session is missing"
    "Field type Store is missing"
    "Field type Folder is missing"
    Thank you very much, any input would be appreciated.

    Hi,
    The setProvider() method in javax.mail.Session can throw an exception called NoSuchProviderException when the Provider passed to it fails to instantiate. As with all java exceptions, this must be caught in you code and can't be ignored, you might like to do some of the online tutorials on this site. This one, http://java.sun.com/docs/books/tutorial/essential/exceptions/firstencounter.html is a good start for exception handling. It looks like you have some other problems there as well. Perhaps some quality time in the tutorial section will help. :-)
    Cheers,
    Peter.

  • Getting error when sending SMTP mail using javamail api

    hi all
    i am new to javamail api...and using it first-time....i'v used the following code
    <%
    String mailHost="mail.mastsale.com";
    String mailText="Hello this is a test msg";
    String to="<a href="mailto:[email protected]">[email protected]</a>";
    String subject="jsp test mail";
    try
    String from="<a href="mailto:[email protected]">[email protected]</a>";
    String mailhost = "mail.mastsale.com";
    Properties props = System.getProperties();
    props.put("mail.smtp.host", mailhost);
    // Get a Session object
    Authenticator auth = new SMTPAuthenticator( "<a href="mailto:[email protected]">[email protected]</a>", "abcd" );
    Session session1 = Session.getInstance(props,auth);
    //Session.setDebug(true);
    //construct message
    Message msg = new MimeMessage(session1);
    msg.setFrom(new InternetAddress(from,"Your Name"));
    msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));
    msg.setSubject(subject);
    msg.setText(mailText);
    //msg.setHeader("X-Mailer",mailer);
    msg.setSentDate(new Date());
    msg.saveChanges();
    //Send the message
    out.println("Sending mail to " + to);
    Transport.send(msg);
    catch (MessagingException me)
    out.println("Error in sending message for messaging exception:"+me);
    %>
    and
    SMTPAuthenticator.java
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    public class SMTPAuthenticator extends javax.mail.Authenticator {
    private String fUser;
    private String fPassword;
    public SMTPAuthenticator(String user, String password) {
    fUser = user;
    fPassword = password;
    public PasswordAuthentication getPasswordAuthentication() {
    return new PasswordAuthentication(fUser, fPassword);
    Now getting error as: Error in sending message for messaging exception:javax.mail.SendFailedException: Invalid Addresses; nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 550-(host.hostonwin.com) [208.101.41.106] is currently not permitted to relay 550-through this server. Perhaps you have not logged into the pop/imap server 550-in the last 30 minutes or do not have SMTP Authentication turned on in your 550 email client.
    Can anyone help me?

    i got the following error while using the below code,
    -----------registerForm----------------
    DEBUG: setDebug: JavaMail version 1.3.2
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth true
    :::::::::::::::::::::::::::::::::<FONT SIZE=4 COLOR="blue"> <B>Error : </B><BR><HR> <FONT SIZE=3 COLOR="black">javax.mail.AuthenticationFailedException<BR><HR>
    -----------registerForm----------------
    public class SendMailBean {
    public String send(String p_from, String p_to, String p_cc, String p_bcc,
    String p_subject, String p_message, String p_smtpServer,String FilePath) {
    String l_result = "";
    // Name of the Host machine where the SMTP server is running
    String l_host = p_smtpServer;
    //for file attachment
    String filename = FilePath;
    // Gets the System properties
    Properties l_props = System.getProperties();
    // Puts the SMTP server name to properties object
    l_props.put("mail.smtp.host", l_host);
    l_props.put("mail.smtp.auth", "true");
    // Get the default Session using Properties Object
    Session l_session = Session.getDefaultInstance(l_props, null);
    l_session.setDebug(true); // Enable the debug mode
    try {
    MimeMessage l_msg = new MimeMessage(l_session); // Create a New message
    l_msg.setFrom(new InternetAddress(p_from)); // Set the From address
    // Setting the "To recipients" addresses
    l_msg.setRecipients(Message.RecipientType.TO,
    InternetAddress.parse(p_to, false));
    // Setting the "Cc recipients" addresses
    l_msg.setRecipients(Message.RecipientType.CC,
    InternetAddress.parse(p_cc, false));
    // Setting the "BCc recipients" addresses
    l_msg.setRecipients(Message.RecipientType.BCC,
    InternetAddress.parse(p_bcc, false));
    l_msg.setSubject(p_subject); // Sets the Subject
    // Create and fill the first message part
    MimeBodyPart l_mbp = new MimeBodyPart();
    //123
    ///////l_mbp.setText(p_message);
    l_mbp.setContent(p_message,"text/html");
    // Create the Multipart and its parts to it
    Multipart l_mp = new MimeMultipart();
         //l_mp.setContent(html,"text/html");
    l_mp.addBodyPart(l_mbp);
    // Add the Multipart to the message
    l_msg.setContent(l_mp,"text/html");
    // Set the Date: header
    l_msg.setSentDate(new Date());
    //added by cibijaybalan for file attachment
         // attach the file to the message
    //Multipart l_mp1 = new MimeMultipart();
         if(!filename.equals(""))
                   String fname = filename;
                   MimeBodyPart mbp2 = new MimeBodyPart();
                   FileDataSource fds = new FileDataSource(fname);
                   mbp2.setDataHandler(new DataHandler(fds));
                   mbp2.setFileName(fds.getName());
                   l_mp.addBodyPart(mbp2);
              // add the Multipart to the message
              l_msg.setContent(l_mp);
    //ends here
         l_msg.setSentDate(new java.util.Date());
    // Send the message
    Transport.send(l_msg);
    // If here, then message is successfully sent.
    // Display Success message
    l_result = l_result + "Mail was successfully sent to : "+p_to;
    //if CCed then, add html for displaying info
    //if (!p_cc.equals(""))
    //l_result = l_result +"<FONT color=green><B>CCed To </B></FONT>: "+p_cc+"<BR>";
    //if BCCed then, add html for displaying info
    //if (!p_bcc.equals(""))
    //l_result = l_result +"<FONT color=green><B>BCCed To </B></FONT>: "+p_bcc ;
    //l_result = l_result+"<BR><HR>";
    } catch (MessagingException mex) { // Trap the MessagingException Error
    // If here, then error in sending Mail. Display Error message.
    l_result = l_result + "<FONT SIZE=4 COLOR=\"blue\"> <B>Error : </B><BR><HR> "+
    "<FONT SIZE=3 COLOR=\"black\">"+mex.toString()+"<BR><HR>";
    } catch (Exception e) {
    // If here, then error in sending Mail. Display Error message.
    l_result = l_result + "<FONT SIZE=4 COLOR=\"blue\"> <B>Error : </B><BR><HR> "+
    "<FONT SIZE=3 COLOR=\"black\">"+e.toString()+"<BR><HR>";
    e.printStackTrace();
    }//end catch block
    //finally {
    System.out.println(":::::::::::::::::::::::::::::::::"+l_result);
    return l_result;
    } // end of method send
    } //end of bean
    plz help me

  • Sending Messages with JavaMail

    I am new to JavaMail, and have a few questions. I am writing a Java application that only needs to send mail via an SMTP server.
    1. Do I need the JAF (JavaBeans Activation Framework) if I only want to send mail?
    2. I seem to be stuck at instantiating the Session. I am using the following:
    Properties props = new Properties();
    props.put("mail.smtp.host", "mySMTPhost");
    Session session = Session.getDefaultInstance(props, null);
    If I wrap the Session line in a try/catch, nothing gets piped out to my log file. When I comment out this line, my System.out.println()'s work.
    3. Could this be because I am not using the correct Exception Type?
    Any help would be greatly appreciated.

    how to give arguments for the msgshow demo program.
    i'am using imate mail server.i have email account in
    yahoo.what host,protocol,port numbers must be gn.
    my email id: [email protected]

  • Sending mail using javamail

    Hi!
    I am new to JavaMail and trying to execute a simple code to send mail.
    I can compile the code without any errors. But when I try to run it, I get following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/MessagingException
    I have my mail.jar and activation.jar in \lib\ext.
    the code is demo code from sun, in their demo files that one gets with javamail.
    Thanks,
    bandya

    You have to put the paths if mail.jar and activation.jar in the system CLASSPATH.
    or you can do this before executing the java program
    in command prompt
    set CLASSPATH=%CLASSPATH%;c:\mail.jar;c:\activation.jar
    assuming the jar are in c:\ .

  • Sending email with javamail

    Hi
    I am new to javaMail....And i having a problem with this program.
    I getting the following exception when the run the following program
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.Properties;
    public class MailDemo
    public static void main(String[] args) throws Exception
    boolean debug = false;
    //Set the host smtp address
    Properties props = new Properties();
    props.put("mail.smtp.host", "smtp.mail.yahoo.com");
    props.put("mail.transport.protocol","smtp");
    props.put("mail.smtp.port","25");
    // create some properties and get the default Session
    Session session = Session.getDefaultInstance(props, null);
    session.setDebug(debug);
    // create a message
    Message msg = new MimeMessage(session);
    Transport transport = session.getTransport();
    // set the from and to address
    InternetAddress addressFrom = new InternetAddress("[email protected]");
    msg.setFrom(addressFrom);
    InternetAddress addressTo = new InternetAddress("[email protected]");
    msg.setRecipient(Message.RecipientType.TO, addressTo);
    // Optional : You can also set your custom headers in the Email if you Want
    msg.addHeader("MyHeaderName", "myHeaderValue");
    // Setting the Subject and Content Type
    //msg.setSubject(subject);
    //msg.setContent(message, "text/plain");
    //Transport.send(msg);
    msg.setSubject("Testing javamail plain");
    msg.setContent("This is a test", "text/plain");
    transport.sendMessage(msg,msg.getRecipients(Message.RecipientType.TO));
    transport.close();
    I get th following error message:
    Exception in thread "main" java.lang.IllegalStateException: Not connected
    at com.sun.mail.smtp.SMTPTransport.checkConnected(SMTPTransport.java:151
    1)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:548)
    at MailDemo.main(MailDemo.java:51)
    It is a simple program to send a plain email...
    Can anyone help me out
    Thanks in advance
    Deepthi

    It's not connected because you never call Transport.connect.
    It's not clear from your code why you chose to use the more
    complex way of managing the Transport object yourself rather
    than just using the static Transport.send method.
    You're also setting some properties that don't really need to be
    set because they match the default values.

  • Javamail extract body part

    Hello All,
    I am new to javamail api.
    The problems, i am encountering are outlined below.
    1- First problem which i am encountering is, when i extract the body out of the email, it contains different html tags as well. How can i get rid of these
    html tags?
    2- Lets say, in my test Gmail account, i had three test emails. Once i read the email body of all three messages and try to
    re-run my application, it says, there are no emails in the Gmail inbox. I am unable to understand this concept, so please
    help me.
    3- Thirdly the disposition is always returned as null, in every case. Why is that?
    My code is given below.
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.util.Properties;
    import javax.mail.Flags;
    import javax.mail.Folder;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Part;
    import javax.mail.Session;
    import javax.mail.Store;
    import com.datel.email.constants.EmailConstants;
    import com.oreilly.networking.javamail.model.EmailBean;
    import com.oreilly.networking.javamail.model.ReceiverInformation;
    import com.oreilly.networking.javamail.model.SenderInformation;
    public class DatelEmailClient {
         public static void main(String[] args) throws MessagingException, IOException {
              DatelEmailClient emailClient = new DatelEmailClient();
              Folder inbox = emailClient.getEmailFolder();
              Message[] messages = emailClient.getMessages(inbox);
              emailClient.readMessageContent(messages);
         public Folder getEmailFolder() throws MessagingException{
              Properties prop = new Properties();
    prop.setProperty(EmailConstants.IMAP_SOCKET_FACTORY_KEY, EmailConstants.IMAP_SOCKET_FACTORY_VALUE);
    prop.setProperty(EmailConstants.IMAP_SOCKET_FACTORY_FALLBACK_KEY, EmailConstants.IMAP_SOCKET_FACTORY_FALLBACK_VALUE);
    prop.setProperty(EmailConstants.IMAP_PORT_KEY, EmailConstants.IMAP_PORT_VALUE);
    prop.setProperty(EmailConstants.IMAP_SOCKET_FACTORY_PORT_KEY, EmailConstants.IMAP_SOCKET_FACTORY_PORT_VALUE);
    prop.put(EmailConstants.IMAP_HOST_KEY, EmailConstants.IMAP_HOST_VALUE);
    prop.put(EmailConstants.IMAP_PROTOCOL_KEY, EmailConstants.IMAP_PROTOCOL_VALUE);
    prop.put("mail.debug", "true");
    Session session = Session.getDefaultInstance(prop);
    Store store = session.getStore();
    System.out.println("Connecting...");
    store.connect(EmailConstants.IMAP_HOST_VALUE, EmailConstants.USER_NAME, EmailConstants.PASSWORD);
    System.out.println("Connected...");
    Folder inbox = store.getDefaultFolder().getFolder("INBOX");
    return inbox;
         public Message[] getMessages(Folder inbox) throws MessagingException{
              inbox.open(Folder.READ_WRITE);
              Message[] msg = inbox.getMessages();
              return msg;
         public void readMessageContent(Message[] message) throws MessagingException, IOException{
              BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
              SenderInformation sender = new SenderInformation();
    ReceiverInformation receiver = new ReceiverInformation();
    EmailBean emailBean= new EmailBean();
              if(message != null){
                   for(int i = 0; i < message.length; i++){
                        System.out.println("Subject: " + message.getSubject());
                        //Reading Email Message Flags
                        Flags flags2 = message[i].getFlags();
                        if (flags2.contains(Flags.Flag.ANSWERED)) {
                             System.out.println("ANSWERED message");
                        if (flags2.contains(Flags.Flag.DELETED)) {
                             System.out.println("DELETED message");
                        if (flags2.contains(Flags.Flag.DRAFT)) {
                             System.out.println("DRAFT message");
                        if (flags2.contains(Flags.Flag.FLAGGED)) {
                             System.out.println("FLAGGED message");
                        if (flags2.contains(Flags.Flag.RECENT)) {
                             System.out.println("RECENT message");
                        if (flags2.contains(Flags.Flag.SEEN)) {
                             System.out.println("SEEN message");
                        if (flags2.contains(Flags.Flag.USER)) {
                             System.out.println("USER message");
                        * Handling body of the message
                        Object object = message[i].getContent();
                        if(object instanceof Multipart){
                             Multipart multipart = (Multipart) object;
                             processMultipart(multipart);
                        System.out.println("Read message? [Y to read / N to end]");
         String line = reader.readLine();
         if ("Y".equalsIgnoreCase(line)) {
                             System.out.println("****************************");
                        else if ("N".equalsIgnoreCase(line)) {
                             break;
                        else {
              }//for ends here
         }//If ends here
    }//readMessageContent ends here
         public void processMultipart(Multipart multiPart) throws MessagingException, IOException{
              System.out.println("Number of parts of Body: " + multiPart.getCount());
              System.out.println("Content type of MultiPart is: "+multiPart.getContentType());
              for(int i =0 ; i < multiPart.getCount(); i++){
                   processPart(multiPart.getBodyPart(i));
         }//processMultiPart ends here
         * @throws MessagingException
         * @throws IOException
         public void processPart(Part part) throws MessagingException, IOException{
              String contentType = part.getContentType();
              System.out.println("Content-Type: " + part.getContentType());
              if (contentType.toLowerCase( ).startsWith("multipart/")) {
                   System.out.println("Calling multipart from processPart..");
                   processMultipart((Multipart) part.getContent( ) );
              InputStream io = part.getInputStream();
              for(int i= 0;i < io.available(); i++)
                   System.out.println("I am reading email body..Y");
                   System.out.print((char)io.read());
                   //buf.append((char) io.read());
                   //String output = (char) io.read();
    }//main ends here
    My constant file is given below
    package com.datel.email.constants;
    public class EmailConstants {
         public static final String IMAP_SOCKET_FACTORY_KEY="mail.imap.socketFactory.class";
         public static final String IMAP_SOCKET_FACTORY_VALUE="javax.net.ssl.SSLSocketFactory";
         public static final String IMAP_SOCKET_FACTORY_FALLBACK_KEY="mail.imap.socketFactory.fallback";
         public static final String IMAP_SOCKET_FACTORY_FALLBACK_VALUE="false";
         public static final String IMAP_PORT_KEY="mail.imap.port";
         public static final String IMAP_PORT_VALUE="993";
         public static final String IMAP_SOCKET_FACTORY_PORT_KEY="mail.imap.socketFactory.port";
         public static final String IMAP_SOCKET_FACTORY_PORT_VALUE="993";
         public static final String IMAP_HOST_KEY="mail.imap.host";
         public static final String IMAP_HOST_VALUE="imap.gmail.com";
         public static final String IMAP_PROTOCOL_KEY="mail.store.protocol";
         public static final String IMAP_PROTOCOL_VALUE="imap";
         public static final String USER_NAME="[email protected]";
         public static final String PASSWORD="xxxxx";
    Please help me out in the above mentioned queries.
    Thanks,
    Ben

    1- First problem which i am encountering is, when i extract the body out of the email, it contains different html tags as well. How can i get rid of these
    html tags?By processing the string to remove the tags. If you don't want to have to parse the html yourself,
    you can search the web for one of the many html parsing Java libraries. (This isn't really a JavaMail problem.)
    2- Lets say, in my test Gmail account, i had three test emails. Once i read the email body of all three messages and try to
    re-run my application, it says, there are no emails in the Gmail inbox. I am unable to understand this concept, so please
    help me.IMAP or POP3? What are your Gmail settings? Did you read the JavaMail FAQ about connecting to Gmail?
    3- Thirdly the disposition is always returned as null, in every case. Why is that?The disposition is optional, so perhaps the sender didn't include it. Or perhaps the server isn't properly
    reporting it to the client. Post the protocol trace when accessing a message with no disposition and
    post the corresponding MIME content of the message.

  • Requirement for javamailing

    iam new to javamail i dont tried even single program,i wanted to write the applicaion E-marketing ,so to write and test javamail application what r the things i should have and i should know.(i.e basic requirement for javamail application)

    Hi Hironmay
    I have to gone through the developer guide .They are saying the same thing as you told me.
    That means no need of admin to logged in to the room. But in my code when another user either viewer or publisher try to initiate the chat with another user.. this action generate following error .
    user don’t have sufficient permission or role
    To avoid the above error i am doing following action
    userManager.setUserRole(userIdTest,UserRoles.OWNER);
    When new user logged into the room, above line of code setting his role to the owner. After this I m not getting any error but facing another problem
    Problem :  user can post only one message , afterward message are not getting displayed on the chat window .On the console I can see message like : chat notified
    For the more info/code Please share your email id
    Do reply me , I am stuck not getting what to do next
    Hironmay wrote:
    Hi Sholay!,
    It is not required for the admin to be present in a chat to have chat. But the admin is required to set up the room and the collectionnode and nodes if it’s a new room.
    There can be various cases e.g. an admin runs an app that has chat in a new room so the chat collectionnode and nodes are created in that room. He can then leave and users can chat in that room always. He will never be required to enter the room again since he has set up the chat.
    You can also create the simplechat collectionnode and nodes as an admin by entering into a room using room console or you can use server to server API. The central idea is admin is required for setting up a chat and its components in a fresh room. Once that is done , either using room console, server 2 server APIs or running an App , other users are free to use the components set up in that room.
    Reading the developer guide upfront will help you.
    Thanks
    Hironmay Basu
    Thanks,
    Ritesh

  • How to install javamail demos

    I have tried to install two different Sun javamail demos:
    1) From Sun javamail-1_2.zip distribution
    javamail-1.2/demo/servlet/JavaMailServlet.java
    2) From Sun website: http://developer.java.sun.com/developer/technicalArticles/javaserverpages/emailapps
    On Red Hat Linux 7.0, I have tried with combinations of the following:
    1) jdk1.3.1_01
    2) jdk1.2.2
    3) Tomcat 3.2.3/Apache 1.3.20/mod_jk
    4) iPlanet Web Server, FastTrack 4.1
    The JavaMail.html webpage itself shows up just fine with all of these combinations. I am able to start other servlets from the test directories so I believe the CLASSPATH and various paths are set correctly.
    For curiosity, I tried just running the javamail1.2 demo separately, knowing that it doesn't have any arguments as set up in JavaMail.html:
    # javac JavaMailServlet.java
    # java JavaMailServlet
    Exception in thread "main" java.lang.NoSuchMethodError: main
    The readme files with the demos just are not specific enough in their install instructions.

    Hi, Iam new to Javamail I just tried a simple programme to send a mail to my yahoo Account using Javamail-1.2. I gave the Yahoo SMTP host address as smtp.mail.yahoo.com as suggested by yahoo.
    But it throws an exception as follows:
    Exception in thread "main" javax.mail.SendFailedException: Sending failed; nested exception is :
    javax.mail.MessagingException: 521 Mail not accepted from this domain
    at javax.mail.Transport.send()(Transport.java:219)
    at javax.mail.Transport.send()(Transport.java:81)
    at MailExample.main(MailExample.java:37)
    but If I set the smtp host as md3.vsnl.net.in and send a mail to my VSNL (my ISP) mail Account. It works finely. Can any one help me to sending mail to my Yahoo A/c and other mail Accounts using JavaMail programme.
    regards
    ramki

  • Javamail: how to start?

    Hello,
    I am new to javamail, where do is start learning this technology. I have just setted up my smtp and pop3 server using apache JAMES. could you please give me a guide where i would start learning javamail. or could u give any useful links to guide me as i start with javamail..
    THanks..

    Please see JavaMail quick start from
    http://www.developerzone.biz/index.php?option=com_content&task=view&id=114&Itemid=36

  • Storage issues in Javamail

    hi all
    am new to javamail and want to know some important issues..... can anyone please clarify me.
    first i need to know , how to connect to microsoft exchange server using javamail.
    next i need to know where the mails and other stuff retreived from the mail server gets stored and how to access them...
    can anyone help me ???????
    thanks
    vijay

    hi
    i would like to add one more thing..... i want to know how to connect to microsoft exchange server using javamail without any commercial product or licensed product........
    thank you

  • Javamail performance and connection pooling

    Dear Javamail users and programmers,
    I am new to javamail. We are working on a commercial web mail project and using Javamail to connect with an IMAP/SMTP clustered server group to read and write mails.
    Our application will have 400000 concurrent users in the system and an Approximate , we will have 200 servers (Glassfish 3 ) and each server will have 2000 active users at time.
    Now my problem! At the moment, we are opening the store each time we read or store mails for each user. I doubt this will have performance issues in production.
    Does anyone have experience using Javamail in this dimension?
    I read the connection pooling mechanism in the package com.sun.mail.imap Descriptio. If i understood correctly, this will require at-least one dedicated connection per user to the server . I think, that will be too many connections at a time for any Imap server cluster system.
    Is there any other method of doing connection pooling?
    Btw in which scenario I should increase the mail.imap.connectionpoolsize to more than one? I assume, i only need to increase this parameter if i want to keep more than one folder open for a particular user at time, isn't it?
    What will be the best approach which suite to our application?
    Thank you very much for any help.
    With regards,
    Alvin Antony

    Connection pooling isn't likely to help in your scenario. IMAP connection pooling does not allow multiple
    users to use the same connection to the server. Unless you want to map all of your web mail users to a
    single IMAP user, connection pooling won't help you.
    The general issue of managing sessions and connections was discussed briefly in this other thread:
    [http://forums.sun.com/thread.jspa?threadID=5423307|http://forums.sun.com/thread.jspa?threadID=5423307]
    I suspect you're going to need to do some experiments to determine the best approach.

  • Javamail offline mode

    I am new to Javamail and I would like to ask the following question:
    I wrote a program through which a new mail is sent to a gmail account.
    It was successfull. Does this has to do anything with the fact that I was connected to a local network?
    I mean if I had no access to the Internet this correct program would be able to send this message?
    Thank you...

    Does this has to do anything with the fact that I was connected to a local network? Yes of course it does. You were able to send a mail to your gmail - it means that your local network had a Mail Transfer Agent (on your gateway probably)
    The program which you have written is a Mail User Agent, whose only job is to send your mail to MTA. It is the MTA that relays your mail to the gmail server.
    If you had no access to the internet, your mail will go as far as the MTA but no further.
    You can create user accounts on your MTA and have messages sent/received between them. Its a sort of local email system. But the messages cannot pass to users whose accounts are not on your MTA

Maybe you are looking for

  • Slow Boot after 10.4.3 Update

    Hi, I'm experiencing a really slow boot time after updating to 10.4.3. This only effects my Dual 2.3 G5, the iMac G5 boots as normal. It seems to hang for at least 2 minutes on the grey screen before completing the boot and launching the login window

  • ITunes playlist help needed

    Hi, I am (and have been for years) streaming songs to iTunes (at v10) on my old power iMac from the iTunes "intel server" MacMini running iTunes (at v11.4). I used to be able to make new playlists simply... Create the new (empty) playlist in iTunes o

  • Missing Trackpad Tab

    I recently had to recreate my Boot Camp partition and reinstalled Windows XP. I have a 15 in. Core Duo Macbook Pro (April 2006) and used the Leopard Disk that came in the Mac Box Set to reinstall my Boot Camp Drivers (Version 2.1). After the Boot Cam

  • Desperate for Delay function - Deadline fast approaching...

    I am trying to do what I suspect is easy, and I've searched but not come up with what I need to do. In my project, I have 4 nav buttons in a nav bar. Press on one and it calls a .swf file that animates the actual pressed button photo larger onto the

  • Questions on Sessions

    Hi, I have the following questions: 1>As I get to understand, session is maintained b/w one instance of the client browser and the web server. But if a child window is opened from the parent window which created the session, is the session shared/usa