Display retreived mails in Swing ...

How can I display the retreived mail headers and mails in a Swing window?
Also...how to make the mail headers clickable?

Most of this is a Swing question, not a JavaMail question, so you should try
asking in the Swing forum, but... Did you find the example client application
included with JavaMail? It's very primitive, but it might get you started.

Similar Messages

  • Random messages won't display in Mail

    Hi,
    Using Mail 2.0.8 on a MacBook Pro 2GHz running Mac OS X 10.4.5.
    Main account is set-up as IMAP. Recently, I began noticing that some messages will not display in Mail, nor will they be marked as read. The message shown in the preview pane is:
    The message from <sender> <sender email> concerning “subject” has not > been downloaded from the server. You need to take this account online in > order to download it.
    However, the account is online. All other messages received at the same time display properly. There are no characteristics common among or unique to messages that behave like this, at least as far as I can discern. Ultimately, without any specific actions, the messages will display properly.
    If I go to my webmail account and read the message, Mail will update soon after to show that it has been read. So clearly the account is online, as Mail can send and receive commands to set the status. Still, the message will not display.
    Has anyone experienced similar behavior, and have you found a solution?
    Thanks!
    Patrick

    Ernie, David, et al,
    Perhaps I spoke too soon. I continue to have the same problem with Mail and my IMAP accounts, which are advancing beyond annoying. I am now considering moving to another email application, which is something I really don't want to do. Following is a brief update:
    * After moving the Mail folder and plist file to my desktop, restarting Mail and entering my accounts again, it worked properly for a short period of time. The behavior reappeared soon thereafter. (I had mboxes on my Mac, not on the server, and for some reason I cannot import them again).
    * I have a bad habit of using my email as a file system, so my inbox was huge. So I took the time to create a bunch of mboxes, file messages, and otherwise clean my inbox. It's now 1/4 the size it was. I'm also trying to habitualize dealing with email and attachments to either file or delete messsages when the come in (so far, so good).
    * When I get a message that exhibits this behavior, I can now Rebuild the mailbox and the message will show. Rebuild occurs quickly because my mailbox is so much smaller, and I've not lost any messages. The messages that previously would not display at all now display properly. However, I must Rebuild every time I receive a message of this type, which occurs several times per day.
    * It appears that messages with attachments display properly, but those without do not. It also appears to be highly likely that all the messages originate from an Exchange Server (I know this to be true of several clients, and others are very likely). I also know for a fact that many that I receive properly are not using Exchange Server.
    * Calendar invitations from Notes work as intended (show up in Mail as ICS files, notifications appear in iCal which allow me to set my status and reply); however, those from Exchange Server only show as text messages (and don't display until I rebuild).
    It appears to me that the problem may lie, at least in my case, to how Mail handles Exchange Server items in IMAP mode, and not just an IMAP bug, but again, I cannot isolate this and be 100% certain.
    Will keep you posted.

  • HT2486 My address book only displays e-mails. How can I sync it with my i-phone to display the address book the same way as my contacts in my i-phone?

    Currently my address book only displays e-mail addresses. It uses the portion of the address in front of the @ as the name. How can I sync it with my i-phone 4S that has name/numbers and addresses of my contacts?

    Hello there, Seta.
    You are correct that this can be done with iCloud. The following Knowledge Base article provides some great instruction for syncing contacts:
    iOS: How to transfer or sync content to your computer
    http://support.apple.com/kb/ht1296
    Particularly:
    Contacts, Calendars, Bookmarks, and Notes
    You can sync contacts, calendars, bookmarks, and notes with other applications on your computer. This allows you to keep all your information in sync across multiple computers and iOS devices. The settings for these items are all in the Info tab for your iOS device in iTunes. With your iOS device connected to the computer, select your iOS device. Then click the Info tab.
    For details on syncing content on your iOS device with your computer, click the sections below.
    Contacts
    To sync contacts with your computer, choose "Sync Contacts with" within iTunes for Windows, or "Sync Contacts" in OS X v10.8, or "Sync Address Book Contacts" in OS X v10.7 and earlier.
    You can sync your contacts with:
    Microsoft Outlook 2003, Microsoft Outlook 2007, Microsoft Outlook 2010 (Windows XP, Windows Vista, Windows 7, and Windows 8)
    Windows Address Book (Windows XP)
    Windows Contacts (Windows Vista, Windows 7, and Windows 8)
    Address Book (Mac OS X v10.7 and earlier)
    Contacts (Mac OS X v10.8)
    Microsoft Entourage 2004, Microsoft Entourage 2008, or Microsoft Outlook 2011 for Mac
    Notes:
    When syncing contacts, you can choose to sync all of your contacts or only selected groups. The option to sync selected items may not show up until after the first sync.
    You can select a group of contacts to which all new contacts created on your iOS device will be added.
    Additional options for syncing include syncing your contacts with Yahoo or Gmail/Google Mail. You will need to configure it with the user name and password for your Yahoo or Google account.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Clicking on mail icon and then the next screen displays, the mail icon if a faded green and i click on it and nothing happens; what's with that?

    I have set up my POP mail account but I can't display my mail.  What's up with that. I have a POP mail account and it sounds like mail is going to my phone, because it shows I have 6 items in my mailbox; however I'm unable to see the mail????

    Reinstall OS X.

  • When I send a mail from my iPhone, it displays the mail server name to the receiver if the mail and does nog display my name or e mail address. This only since upgrading my iPhone5 to iOS7

    When I send a mail from my iPhone, it displays the mail server name to the receiver if the mail and does not display my name or e mail address. This only since upgrading my iPhone5 to iOS7. I've checked all settings etc. anyone have a solution please?

    Rectory wrote:
    Please can someone tell me how  I can change this so when I send a mail from my phone and from the IPad that it reads from me.
    You need a separate email address but you've already ruled out that solution.

  • Displaying a matrix in swing----HELP!! :)

    Hello I want to print out values from a matrix in some sort of table.
    javax.swing.JTable is almost what I want, but you can't do row labels (only column labels, I think)--
    Are there any classes like JTable, but a little more like an Excel spreadsheet where you have labels on the columns and rows???
    Or any other suggestions for displaying matrix values with swing would be helpful!!
    THANKS!!!!

    .

  • Display Unicode Character in Swing Objects

    I am trying to display Chinese Characters using Swing GUI.
    I created Unicode strings using escape character \uXXXX
    I displayed \u4e00 successfully
    However when I tried to display \ub8db i got a square box displayed instead.
    I am using: Winnt ver 4 ,RichWin 97
    private Object listData[] = {
    new String("\ucfe3\ub8db"), // Two boxes displayed in list
    new String("\u4e01\u4e00"), // Characters displayed correctly
    new String("Third selection")
    To hope to get some replies ASAP. Thanks!!!
    Regards,
    Patrick

    Hi Patrick,
    Yeh, fonts are rather ubiquitous when it comes to internationalization. The fact that the font.properties files still exist confuses a lot of people. In reality, Sun doesn't support them any more, and they aren't all that useful if you're actually deploying your code onto other machines.
    So, to answer your questions... :D
    1) Each component will have a font set on it. To start with, each component will end up with the JDK default, usually the Dialog font in Java. From memory, I think this maps to Arial on Windows systems, though I'm not sure if RichWin alters this in anyway, as I haven't used it myself.
    You can check the available fonts on your machine by calling:
    GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
    This returns an array of strings. You can basically create a new font from any of the names that appear in here. For instance, if one of the strings was "Arial Bold", you could create the following font:
    Font myFont = new Font("Arial Bold", Font.PLAIN, 12);
    2) The best way is to simply create the font you want on startup. If you can't rely on the font
    you need being installed on every machine you plan to run your program on, the best solution is to either install it on startup, or carry it around with you.
    Have a look at Font.createFont(), as it allows you to create a new Font object from a *.TTF file (a TrueType font). In JDK1.3, this is buggy, leaving a large temp file behind every time you run it, but I've already tried this under Merlin Beta, and it's fixed and working fine.
    The reason this is handy is because the font we keep talking about on here, Arial Unicode MS, is a TrueType font. So you can carry the font around with you, and load it on startup using this call.
    Arial Unicode MS is a 23Mb font, but it's capable of displaying just about any character you could imagine.
    The trick from there, once you've loaded your font, is to make sure you call setFont() on just about any component you create. Menus are a cow - you've got to listen for events, as the dropdown menus don't always get the font straight away. But other than that, it's fairly simple.
    3) The short answer is to call the getAvailableFontFamilyNames() call above, and look for any familiar font names. If you can't find any, you know you're not going to be able to display anything.
    Windows seems to have standard fonts for the international languages. In Chinese, this is SimHei for Simplified (mainland) Chinese, and MingLiU for Traditional (Taiwanese) Chinese. Simplified covers about 30,000 Kanji, while Traditional covers around 80,000.
    So for Chinese, you would look for "SimHei" and "MingLiU", plus any of the fonts capable of displaying anything, like "Arial Unicode MS". If none of these strings are in the array, you may want to carry the Arial Unicode MS installer around with you and execute it. This file is about 11Mb, and is available as a download off the Microsoft website.
    4) Probably about the most useful thing I've come across is the Sun I18N tutorial on this very website. There isn't a heck of a lot out there, unfortunately. About the only other things I can recommend are http://www.unicode.org for the Unicode character codes, and http://www.njstar.com for NJStar Communicator, which you'll find useful if you're working with Chinese.
    Oh, and watch this forum, of course. ;D
    Hope that helps!
    Martin Hughes

  • How can I send HTML emails that display in Mail?

    Hi,
    I have an email newsletter that I recently have begun experimenting with in HTML. The problem is, when I try to use HTML, the message displays properly in things like Yahoo! webmail, but in Mail for OSX, it displays like a regular text message, images and formatting are not used. I'm sending the messages from PHPList. Is there something I need to add to my code to get it to display correctly?
    Thanks much.
    -Jonas

    Well, I did check the layout in Safari, and it looked fine. Since I'm not sending the messages from Mail (since it's for a rather large mailing list handled by PHPList), selecting "Mail the Contents of this Page" wouldn't really do very much for me.
    If I do try to send the page using that technique, it does work. But I have to use PHPList to compose and mail the message. I just need to know if there's any other code I need to add to make it display in Mail. I can receive other HTML emails no problem, but mine just shows up as text, disregarding images and other elements. I just don't know what's going on here.

  • Displaying a matrix in Swing

    Hi all,
    Is there anybody who knows a easy way of displaying a matrix in Swing. It can be done by declaring a lot of buttons (64 buttons in a 8x8 matrix) and than displaying them, but there has to be a better way. Any suggestions
    Greetings.
    Vincent

    You could use AWT or Java2D graphics to display them within a JPanel. Just override the paintComponent(Graphics g) method (don't forget to call super.paintComponent(g) first) and do the drawing in there.
    If you need interaction, you could implement a MouseMotionListener and MouseListener to see over which element the mouse is over and in which a mouse button was clicked (or even double-clicked).
    class MyMatrixPanel extends JPanel implements MouseListener, MouseMotionListener {
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    g.setColor(Color.white);
    g.fillRect(0,0,this.getWidth(),this.getHeight());
    g.setColor(Color.black);
    for(int i = 0; i < number_of_rows+1; i++) {
    g.drawLine(x1,y1,x2,y2);
    g.drawString("m00",x,y);
    for(int i = 0; i < number_of_columns+1; i++)
    g.drawLine(x1,y1,x2,y2);
    The JPanel will need to be added to a JFrame, JDialog, or similar. You'll have to supply the coordinates, and of course this is skeletal. Let me know if this helps and if you need more info.
    Robert Templeton

  • How do I display sent mail on new ios7 on I pad?

    How do I display Sent mail in new ios7 on iPad?

    The same way you did before, by going to the Sent Mail folder in the Mailboxes list. Other than the overall look, the Mail app hasn't changed substantially in iOS 7.
    If you continue to have issues or have other questions, I'd suggest you post in the iPad forum. The forum in which you posted this thread was for questions about the Communities themselves (though the thread may have since been moved by the Hosts).
    Regards.

  • Displaying image on the swings application

    Hi All,
    I want to display images onto my swing application. I was using ImageIcon and Class to getResource(filename). It can only provide me images that i have placed in my package not outside my package.
    Please help me, how to to do?
    Thanks in advance.

    [url http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html]How to Use Icons

  • Outlook mail app display arabic mail subjects and folders names as "??????"

    outlook mail app display arabic mail subjects and folders names as "??????" , any way to solve this problem ? thanks

    Skydiver119 wrote:
    the ipad likely doesn't have a font to display the mails
    That's nonsense, if you look at the settings you will see you can put the entire device into Arabic if you want, as well as type and read Arabic emails and other docs.  The font is there, but for some reason the encoding is botched, either by the app or the place sending the email to the iPad.

  • After updating to OS X 10.8.3, remote images fail to be displayed in Mail

    After updating to OS X 10.8.3, images fail to be displayed in Mail regardless of setting in "Display remote images in HTML messages".
    Any clue ?

    I'm also having this problem.  Help?

  • Wrong display  of mail in Outlook ; Urgent pls

    Dear All,
    I am getting error while sending mail from jsp. I want to send html content to mail in jsp, on my local host its working correctly, but after uploading it on ISP server the content which i sent is not a html, but its dispalying plain text with html codes. i.e its giving html code instead of html page in mail. Please help me, its urgent
    My code is as follows
    // this is the html data which should be displayed in mail, its the dynamic data
    String data="<body bgcolor='FFFFFF' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>
    <table width='100%' border='0' cellspacing='0' cellpadding='5'><tr><td bgcolor='#FFFFFF'>
    <table width='100%'><tr><td colspan='2'><table width='100%' border='0' cellspacing='0' cellpadding='0'>
    <tr><td bgcolor='#920003'><font color='#FFFF33' size='+3'><strong>Churchill</strong></font>
    <font color='#FFFFFF' size='+1'>Independent Estate Agents</font></td></tr><tr><td><hr size='1'>
    </td></tr></table><p style='font-family:Verdana,Arial,sans-serif;font-size:11px;'>
    You were sent this email because <a href='mailto:"+YEmailID+"'>"+YEmailID+"</a>
    requested you receive a copy.</p><table width='100%' cellspacing='0'
    cellpadding='0' style='background-color:#EEEEEE;font-family:Verdana,Arial,sans-serif;font-size:11px;'>
    <tr><td style='padding-left:5px;padding-top:10px;padding-bottom:10px;background-color:#CCCCCC;'>
    "+YEmailID +" also sent you this message:</td></tr><tr><td
    style='padding-left:5px;padding-top:15px;padding-bottom:15px;font-size:10px;'>
    '"+Msg+"'</td></tr></table><br></td></tr><tr><td width='97%'><font size='2'
    face='Verdana, Arial, Helvetica, sans-serif'></strong></font></td></tr><tr>
    <td width='39%' bgcolor='#920003'><font color='#FFFFFF' size='2' face='Verdana,
    Arial, Helvetica, sans-serif'>"+subdata+"</font></td></tr><tr><td><table width='100%'
    border='0' cellspacing='0' cellpadding='0'><tr><td width='66%'><div align='center'><a
    href='"+url+"/searchfulldetails.jsp?proid="+str[1]+"&dealtype="+str[18]+"' target='_blank'>
    <img src='"+url+str[10]+"' width='350' height='247' border='0'></a></div></td></tr></table>
    </td></tr><tr><td> </td></tr><tr><td><p><font size='2' face='Verdana, Arial,
    Helvetica, sans-serif'><strong>Full details</strong></font></p><p><font size='2'
    face='Verdana, Arial, Helvetica, sans-serif'>"+str[8]+"</font></p><p><font size='2'
    face='Verdana, Arial, Helvetica, sans-serif'>To know more about this property
    from us, please <a href='"+url+"/searchfulldetails.jsp?proid="+
    str[1]+"&dealtype="+str[18]+"' target='_blank'>
    click here</a></font></p><p><font size='2' face='Verdana, Arial, Helvetica, sans-serif'>
    <Strong>Call : "+str[9]+"</Strong></font></p></td></tr></table></body>";
    String mailServer = "xxx.xxx.xxx.xxx"; // here im giving my mail server name
      if(FEmailID.equals("") )
           FEmailID = "unknown";
        Properties props = new Properties();
        props.put("mail.smtp.host", mailServer);
        Session s = Session.getInstance(props,null);
        MimeMessage message = new MimeMessage(s);
        InternetAddress from = new InternetAddress(YEmailID);
        message.setFrom(from);
        InternetAddress to = new InternetAddress(FEmailID);
         message.setContent("html","text/html");
         message.addHeaderLine("Content-Type: text/html; charset=\"iso-8859-1\"");
         message.addHeaderLine("Content-Transfer-Encoding: quoted-printable");
         System.out.println("Mohsin Syed, just for testing line number 73");
        message.addRecipient(Message.RecipientType.TO, to);
        message.setSubject("Churchills Property: "+str[7]);
        message.setText(messageEnter);
         message.setText(data);
        Transport.send(message);the resultant mail in Outlook is as follows , ie it gives this text in outlook
    Harlesden
    Mime-Version: 1.0
    Content-Type: text/html; charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    <body bgcolor=3D'FFFFFF' leftmargin=3D'0' topmargin=3D'0' marginwidth=3D'0'= marginheight=3D'0'>
    <table width=3D'100%' border=3D'0' cellspacing=3D'0' ce= llpadding=3D'5'><tr><td bgcolor=3D'#FFFFFF'><table width=3D'100%'>
    <tr><td c= olspan=3D'2'><table width=3D'100%' border=3D'0' cellspacing=3D'0' cellpaddi= ng=3D
    '0'><tr><td bgcolor=3D'#920003'><font color=3D'#FFFF33' size=3D'+3'><s=
    trong>Churchill</strong></font> <font
    trong>color=3D=
    '#FFFFFF' size=3D'+1'>Independent Estate Agents</font></td></tr><=
    tr><td><hr size=3D'1'></td></tr></table><p
    tr>style=3D'font-family:Verdana,Ari=
    al,sans-serif;font-size:11px;'>You were sent this email because <a hre=
    f=3D'mailto:[email protected]'>[email protected]</a> request=
    ed you receive a copy.</p><table width=3D'100%' cellspacing=3D'0' cellpaddi=
    ng=3D'0' style=3D'background-color:#EEEEEE;font-family:Verdana,Arial,sans-s=
    erif;font-size:11px;'><tr><td style=3D'padding-left:5px;padding-top:10px;pa=
    dding-bottom:10px;background-color:#CCCCCC;'>[email protected] al=
    so sent you this message:</td></tr><tr><td style=3D'padding-left:
    5px;paddin= g-top:15px;padding-bottom:15px;font-size:10px;'>'testing1200'</td></tr></ta=
    ble><br></td></tr><tr><td width=3D'97%'><font size=3D'2'
    ble>face=3D'Verdana, A=
    rial, Helvetica, sans-serif'></strong></font></td></tr><tr><td width=3D'39%=
    ' bgcolor=3D'#920003'><font color=3D'#FFFFFF' size=3D'2' face=3D'Verdana, A=
    rial, Helvetica, sans-serif'><strong> � 298500</strong></fo=
    nt></td></tr><tr><td><table width=3D'100%' border=3D'0'
    nt>cellspacing=3D'0' c=
    ellpadding=3D'0'><tr><td width=3D'66%'><div align=3D'center'>
    <a href=3D'htt= p://localhost:9999/Churhcill//searchfulldetails.jsp?proid=3D125&dealtype=
    =3DSale' target=3D'_blank'><img src=3D'http://localhost:9999/Churhcill/im=
    ages/property/S125.JPG' width=3D'350' height=3D'247' border=3D'0'></a></div=
    </td></tr></table></td></tr><tr><td> </td></tr><tr><td><p><font
    size==3D'2' face=3D'Verdana, Arial, Helvetica, sans-serif'><strong>Full details<=
    /strong></font></p><p><font size=3D'2' face=3D'Verdana, Arial, Helvetica, s= ans-serif'>
    This three bedroom terraced property has recently been refurbish= ed by its
    present owners. Situated on this residential road with shopping f= acilities
    which can be found along Craven Park and varied transport links i= ncluding
    Harlesden Station (Jubilee Line). </font></p><p><font size=3D'2' f= ace=3D'
    Verdana, Arial, Helvetica, sans-serif'>To know more about this prope= rty
    from Churchill, please <a href=3D'http://localhost:9999/Churhcill//se=
    archfulldetails.jsp?proid=3D125&dealtype=3DSale' target=3D'_blank'>
    click he= re</a></font></p><p><font size=3D'2' face=3D'Verdana, Arial, Helvetica, san= s-serif'>
    <Strong>Call : 020 89652250</Strong></font></p></td></tr></table><=
    /body>

    The MimeMessage's setText api states
    "Convenience method that sets the given String as this part's content, with a MIME type of "text/plain".
    I think you should not use setText if your content type is not "text/plain", rather try using MimeMessage's setContent(body, "text/html") api
    where body is a String that has your html message body.

  • How to Display an Image in swing

    I Want to display an image in swing using the scrollPane, so I can scroll an image in a box

    A very simple way is to use a JLabel :
    JLabel label = new JLabel(new ImageIcon("myImage.jpg"));
    JScrollPane scroller = new JScrollPane(label);

Maybe you are looking for

  • Problem in CC with FTPS Adapter

    Hello everyone, I try to connect with a partner with FTPS Adapter, I load the certificate from server and have the next error: Error occurred while connecting to the FTP server "server:21": iaik.security.ssl.SSLException: Error decoding Certificate:

  • How do I add a Filter to the Spaces switcher within webcenter spaces??

    Hi Experts, We are on Webcenter Spaces PS3(11.1.1.4) We urgently need assistance with the following: 1. The client needs a filter that will show only the collaborations spaces to which the user belongs to whenever they click on the Spaces switcher li

  • TMS Configuration between systems in different platforms

    Hi Gurus!! We are changing the HW of our EBP 4.0 Systems and now we have a doubt. We have already change DEV system from NT to AIX 5.3 and we don't know if we can configure the TMS to execute imports of transports requests from AIX (DEV System) to NT

  • What init parameters will help with the OBIEE performance..?

    Hi All By any chance does any one have info on What init parameters will help with the OBIEE performance..? Thanks

  • [Solved]500 Internal Server Error- when open dialog page for LOV

    Hello I have developed JSF / ADF Bc application and my form has inputselect component and everything works fine in embeded OC4J, but when i deploy the application to apps server i get below error when i launch the dialog page to select a value 500 In