How to read emails using javamail

hello friends
well i am working on a project on phishing for that i had usinf javamail to read out the mails while i open my any email account while i working on the net .
actually what i want is whenever i open my account my program could detect the mail and it will it work after that
so can anyone please help me out in doing this means my first problem is how to get my program get linked with that so that everytime i opem my email account (not specific) i can use the message stuff written in that for my further use
please help me guys i really need help
please reply as soon as possible
thanks

i could not understand your problem exactly.
if you mean you want to check the new messages count: you can simply used
int newMessages = folder.getNewMessageCount();if you are reading mails first time using javamail.
see http://itoday.wordpress.com/2007/04/08/sending-mail-using-javamail-apis/
if you mean something else ... please let me know
asif shahzad
Edited by: asifsh7 on Jul 22, 2008 8:53 AM

Similar Messages

  • How to read Email address from TO field

    Hi,
    I am try to read email from outlook using JACOB api. now i can able to read all email from outlook.
    my problem is while i am read TO field for Mail , its return the display name instead of email address.
    please any one tell me how to read email address from TO,CC and BCC field.
    Thanks in advance,
    With Regards,
    Ganesh Kumar.L

    Hi all,
    I am solved my problem,
    First i am getting the Recipients object from mail item object,
    and recipient object i can get all my required details.
    Thanks,
    by
    ganesh

  • TS3899 how to read emails on iphone 4s ?

    How to read emails on iphone 4s?

    Hi cblira!
    Here is an article with some tips about troubleshooting the mail app:
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/ts3899
    If the steps in that article do not resolve the issue, you may need to restore your device:
    Use iTunes to restore your iOS device to factory settings
    http://support.apple.com/kb/ht1414
    Take care, and thanks for visiting the Apple Support Communities.
    Cheers,
    Braden

  • Can't read email using my primary apple email account

    Ok, I'm new to this forum but here is my problem
    Usually I can read Email using my primary Apple E-mail account BEFORE I updated my Ipad into IOS 8.
    After I updated my Ipad into IOS 8 (non-jailbreak and from IOS 5 jailbreak), My Ipad says that I need to sign up an Icloud email to use the Mail App.
    Then I can't use my Primary Apple Account as an E-mail anymore. When people send a mail to my primary apple account, I cant read it because I cant read emails using my Primary Apple Account anymore.
    When I signed in with my primary apple Email account and opened my Mail App, It used my Icloud email instead my primary apple email.
    I tried everything Include making an email aliases but my primary apple email uses @Yahoo.com and I can only use aliases of @Icloud.com
    Can someone please help me so I can read E-mails when people send an Email to my primary apple account? Because I need to see those subcription mails and change my password of my online game account(<- This one is URGENT).
    And sorry for my bad English because I'm Indonesian.

    Welcome to discussions,
    go to settings/mail, contacts.../your mail account/outgoing mail server settings/ and see if you put in the needed password to access your mail server.
    Also check out this help article about your issue for more tips: http://support.apple.com/kb/TS2770

  • How to send secure email using JavaMail

    Hi, anyone out there know how to send secure email using Java Mail? Greately appreciated.

    For starters, if you have not already done so, read about it in the JavaMail design specifications.
    Search for Message Security in the said document.

  • How to filter emails using sender email adapter

    Hi,
    Does any one know how to filter emails of mail server using Sender email adapter(POP3 protocol ) in PI .
    To make it more clear let us assume that there are 10 emails in the email server then 3 emails should be fetched for Interface A , 3 emails Should be fetched for Interface B and remaining 4 emails should be ignored and left in the email server as it is ,  the reason for this is that it is not related with the Interface A or Interface B. Any suggestion or solution will be much appreciated.
    Thanks & Regards
    Prabhat

    Hi,
    I guess you didnt get my requirement clearly. My requirement is how to filter emails from email server using sender Email adapter in POP3 protocl and pass it to relevant Interface.
    For ex: suppose email no.1 is related to Interface A then it should go to Interface A
                   or         email no. 2 is related to Interface B then it should go to Interface B
                   or         if  email no. 3 is junk mail then it should avoid deleting that email and leave that email as it is
    The problem/challenge here is that email adapter of Interface A or B reads it first and deletes the email message so it is not available for the Interface A or B.
    So I just want that sender email adapter should filter it before deleting email from the email server.
    Can you provide some solution for this?
    Thanks & Regards
    Prabhat

  • How to send emails using JSP?

    How can i send emails using JSP? what are the things that i will need? please help me asap...thanks

    Hi,
    This works for me:
    <%
    String from = "Person"
    String to= "my-email-address;
    try{
    SmtpClient client = new SmtpClient("smtp.stuff.com");
    client.from(from);
    client.to(to);
    PrintStream message = client.startMessage();
    message.println("To: " + to);
    message.println("Subject: Sending an e-mail");
    message.println();
    message.println("Groovy :-)");
    client.closeServer();
    catch (IOException e){
    System.out.println("ERROR SENDING EMAIL: "+e);
    %>

  • Read email using APEX

    Hi,
    Now APEX has some good API to send out emails -- but any idea how to retrieve emails from mail server using APEX or pl/sql packages?
    Basically something to retrieve emails to database table and use APEX to build a UI to read them.
    Thanks!
    thcheng

    Hi,
    have a look at http://sql-plsql-de.blogspot.com/2007/12/emails-aus-einem-postfach-abrufen.html
    It describes a Java stored procedure to read emails which is wrapped by a PL/SQL wrapper. The posting is written in German, but you can use a translation service like Google to read it in English.
    Patrick
    My APEX Blog: http://www.inside-oracle-apex.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://apexplugin.sourceforge.net/ New!

  • How to reject emails using address email's sender

    Hi,
    I'm wondering if it's possible to reject emails using address email's sender.
    Thanks,

    sorry, I thought it was one of the built in options. you can do it with an apple script rule then.
    paste the following into a blank Applescript Editor window . Applescript Editor is located in /Applications/Utilities
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    using terms from application "Mail"
    on perform mail action with messages selectedMsgs
    repeat with msg in selectedMsgs
    tell application "Mail"
    bounce msg
    end tell
    end repeat
    end perform mail action with messages
    end using terms from</pre>
    save the script somewhere and set your Mail rule to run this script on messages from that sender.

  • HOW to read file using ftp???

    Hi to all,
    I have problem with reading file using ftp connection, i want to read only 1024 bytes for one time, and i have
    next code wich read this:
    byte buffer[] = new byte[1024];
    while( (readCount = input.read(buffer)) > 0) {
    bos.write(buffer, 0, readCount);
    but I dont know how to put all read data in one byte[] if i dont know length of file.
    I can't do some like: byte file[] = new file[1000000];
    Thanks for all sugestions!

          * Download a file from a FTP server. A FTP URL is generated with the following syntax:
         * <code>ftp://user:password@host:port/filePath;type=i</code>.
          * @param ftpServer FTP server address (incl. optional port ':portNumber').
          * @param user Optional user name to login.
          * @param pwd Optional password for <i>user</i>.
          * @param fileName Name of file to download (with optional preceeding relative path, e.g. one/two/three.txt).
          * @param destination Destination file to save.
         * @throws MalformedURLException, IOException on error.
         public void download(String ftpServer, String user, String pwd, String fileName, File destination) throws MalformedURLException, IOException {
            if (ftpServer != null && fileName != null && destination != null) {
                StringBuffer sb = new StringBuffer("ftp://");
                if (user != null && pwd != null) { //need authentication?
                    sb.append(user);
                    sb.append(':');
                    sb.append(pwd);
                    sb.append('@');
                }//else: anonymous access
                sb.append(ftpServer);
                sb.append('/');
                sb.append(fileName);
                sb.append(";type=i"); //a=ASCII mode, i=image (binary) mode, d= file directory listing
                BufferedInputStream bis = null;
                BufferedOutputStream bos = null;
                try {
                    URL url = new URL(sb.toString());
                    URLConnection urlc = url.openConnection();
                    bis = new BufferedInputStream(urlc.getInputStream());
                    bos = new BufferedOutputStream(new FileOutputStream(destination.getName()));
                    int i;
                    while ((i = bis.read()) != -1) { //read next byte until end of stream
                        bos.write(i);
                    }//next byte
                } finally {
                    if (bis != null) try { bis.close(); } catch (IOException ioe) { /* ignore*/ }
                    if (bos != null) try { bos.close(); } catch (IOException ioe) { /* ignore*/ }
            }//else: input unavailable
        }//download()If you don't want to strore the data into a file, use ByteArrayOutputStream instead of a FileOutputStream.

  • How to read OVD using java

    Hi all,
    how to access OVD using Java?
    Thanks,
    Kumar.P

    Hi,
    You can just normal LDAP API codes to connect to OVD the same way you connect to other LDAP servers.
    PFB sample code for connecting to OVD.
    Properties props = new Properties();
    try {
    props.load(new FileInputStream("LdapCredentials.Properties"));
    } catch (IOException e) {
    // TODO
    ldapurl = "ldap://hostname:390";
    ldapUser = "cn=orcladmin,ou=Org12,dc=ovid,dc=com";
    userPassword = "welcome1"; //"Killtheking123456";
    userContext = "ou=Join1,dc=ovid,dc=com";
    Now, you have to get Directory Context as shown below.
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, ldapurl);
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, username);
    env.put(Context.SECURITY_CREDENTIALS, password);
    //Initialize the Directory context
    DirContext dCtx = new InitialDirContext(env);
    Then you can perform search operations or new user creation etc., as you wish.
    Does this help?
    -Mahendra.

  • How to send emails using java code

    Hi,
    can any give me some sample code for sending emails using java language

    JavaMail quick start
    jGuru: Fundamentals of the JavaMail API

  • How to read emails from Microsoft Exchange Server

    I have microsoft exchange server and I want to read emails from microsoft exchange server. There is no POP3 server. So is it possible?
    If it is possible to read emails from microsoft exchange server then please give me some idea.
    Thanks
    Santanu

    santanu wrote:
    Hi,
    My company is using Microsoft exchange server.
    IMPA and POP3 has been disabled, but my requirement is I wan to read email.Then ask the administrator of the server to enable IMAP. If you have a valid business requirement to do that, there would be no reason for the administrator to refuse.

  • How to Send Html Email using JavaMail?

    I want to send email message body as html.
    as some news sites send.What will easiest way of doing that?

    oops!!!
    Sorry there is one more thing in it the ByteArrayDataSource class. I am posting the code in the class here. Compile it in a separate class.
    class ByteArrayDataSource implements DataSource
        private byte[] data;     // data
        private String type;     // content-type
        /* Create a DataSource from an input stream */
        public ByteArrayDataSource(InputStream is, String type)
            this.type = type;
            try
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                  int ch;
                  while ((ch = is.read()) != -1)
                // XXX - must be made more efficient by
                 // doing buffered reads, rather than one byte reads
                 os.write(ch);
                  data = os.toByteArray();
            } catch (IOException ioex) { }
        /* Create a DataSource from a byte array */
        public ByteArrayDataSource(byte[] data, String type)
            this.data = data;
              this.type = type;
        /* Create a DataSource from a String */
        public ByteArrayDataSource(String data, String type)
              try
             // Assumption that the string contains only ASCII
             // characters!  Otherwise just pass a charset into this
             // constructor and use it in getBytes()
             this.data = data.getBytes("iso-8859-1");
              catch (UnsupportedEncodingException uex)
              this.type = type;
         * Return an InputStream for the data.
         * Note - a new stream must be returned each time.
        public InputStream getInputStream() throws IOException
              if (data == null)
                  throw new IOException("no data");
              return new ByteArrayInputStream(data);
        public OutputStream getOutputStream() throws IOException
              throw new IOException("cannot do this");
        public String getContentType()
            return type;
        public String getName()
            return "dummy";
    }hope this will help
    best wishes
    khuda hafiz

  • My font size changed in Firefox when trying to read email using yahoo email. I now have to use explorer to read my mail. can you tell me how to return back to the readable size font. thank you

    I have been using firefox for years to read my email. recently the size of text became small and hard to read. I would like to get the text size large again, so I don't have to use the other browser. I have a att yahoo email account and subscribe to at&t uverse for internet service.

    I tried both of your suggestions and neither one worked. I found the solution by clicking on the "View" button, then "Reset". This put my email back to the original font/text size. Somehow the screen had been Zoomed in, so to change it, follow the instructions above.

Maybe you are looking for

  • What the actual bug is in the iPhone 2.0 ActiveSync implementation

    There is a serious bug in the ActiveSync client implementation in the iPhone 2.0 software. I'm pretty aware of this as I'm a Sr. Engineering type for another major cellular handset OEM and went through the same issues debugging/QAing development of a

  • Index information missing in ALL_OBJECTS

    Hi, In our database ,ALL_OBJECTS is not having the index information. Please tell me What could ve the reason? Thanks, Kumar.

  • Best way to access Excel & Word documents on iPad

    On my iMac I have  a number of EXCEL and WORD documents created with Excel / Word MICROSOFT for MAC 2011. I want to access these Word and Excel documents on my iPad. I am confused as to what is the best way to do this.    Pages & Numbers with iCloud

  • Find/Change object size

    We have a document where each page header/number needs to be changed to a different language. We can find change the text ok but when the text is changed the text box is too small. Unfortunately the headers are not on master pages and the colours var

  • Can't open iTunes - Error 7

    Hello, for some reason i can't open itunes since the last update. each time it says: "The program can't start because AVFoundationCF.dll is missing from your computer." and afterwards - "iTunes was not installed correctly. please reinstall itunes. Er