How do I read a Email from the MS exchange server

could any one tell me as to how i could read the mail from the exchange server and store it in a seperate folder.

I have an application which reads the mail from our mail server and then writes the body of the message into a file and then deletes the email anf those values are then read from that file and stored into the database .
Here is the code which pops the mail from the exchange server and then stores it into a file .
import javax.mail.*;
import com.sun.mail.pop3.*;
import javax.mail.internet.*;
import javax.activation.*;
import java.util.*;
* Title:
* Description:
* Copyright: Copyright (c) 2001
* Company:
* @author
* @version 1.0
public class SunMailConnection implements Runnable{
     boolean suspendFlag;
     ErrorLogWriter log = new ErrorLogWriter("SunMail.log");
     public SunMailConnection() {
          this.start() ;
     public void run(){
          try {
               int start = 1;int end = -1;
               String host = "cyde-cehh-exh1";//the local exchange server name AND DOESNT WORK IF U CONNECT TO EXT MAIL SERVER DIRECTLY
               //DUE TO SECURED AUTHORISATION
               //String host ="http://www.conergy-electronics.de";
               String username ="SunReader\\Sun\\saa";
               String password = "xxxxx";
               // Create empty properties
               Properties props = new Properties();
               props.put("mail.protocol.store","pop3");
               // Get session
               Session session = Session.getDefaultInstance(props, null);
               Provider[] p = session.getProviders();
               //for (int i=0;i<p.length;i++) System.out.println(p.getProtocol());
               // Get the store
               Store store = session.getStore("pop3");
               store.connect(host, username, password);
               // Get folder
               Folder folder = store.getFolder("INBOX");
               if (folder == null || !folder.exists()) {
                    //System.out.println("Invalid folder: " + folder.getName());
                    log.write("Invalid folder: " + folder.getName()) ;
                    System.exit(1);
               folder.open(Folder.READ_WRITE);
               //Get the number of Unread Messages
               int count = folder.getUnreadMessageCount();
               if (count == 0) { // No messages in the source folder
                    //System.out.println(folder.getName() + " is empty");
                    // Close folder, store and return
                    folder.close(false);
                    store.close();
                    return;
               if (end == -1)
                    end = count;
               // Get the message objects to copy
               log.write("Test");
               Message[] msgs = folder.getMessages(start, end);
               //System.out.println("Moving " + msgs.length + " messages");
               //log.write("Moving " + msgs.length + " messages") ;
               if (msgs.length != 0) {
                    //If there is any mail
                    //System.out.println(msgs.length );
                    //read mail from server into files
                    MoveMessageTo saveFile = new MoveMessageTo(msgs);
                    if(saveFile.createdFile=true){
                         folder.setFlags(msgs,new Flags(Flags.Flag.SEEN),true);
                         //delete flag set here to remove the email from INBOX
                         folder.setFlags(msgs, new Flags(Flags.Flag.DELETED), true);
                    //folder.expunge(); //removes messages marked as deleted
                    //check for deleting messages
                    for (int i = 0; i < msgs.length; i++) {
                         if (!msgs[i].isSet(Flags.Flag.DELETED))
                              log.write("Message # "+msgs[i]+" not deleted.");
                         //else System.out.println("Message "+i+"-is deleted") ;
               // Close connection
               folder.close(true);
               // dfolder.close(false);
               store.close();
               //this.start() ;
          }catch (Exception ex) {
               ex.printStackTrace() ;
          //this.t.start();
     public void start(){
          try {
               while(this!= null){
                    this.run() ;
                    Thread.sleep(15000);//every 15 seconds
          }catch (Exception ex) {
               ex.printStackTrace();
     public void exit(){
          this.exit();
          System.out.println("Exit");
     public static void main(String[] args) {
          SunMailConnection sunMail = new SunMailConnection();
This is to show the messages
import java.util.*;
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
public class msgshow {
static String protocol;
static String host = null;
static String user = null;
static String password = null;
static String mbox = "INBOX";
static String url = null;
static int port = -1;
static boolean verbose = false;
static boolean debug = false;
static boolean showStructure = false;
static boolean showMessage = false;
public static void main(String argv[]) {
     int msgnum = -1;
     int optind;
     protocol = "pop3";
     host="cyde-cehh-exh1";
     user="SunReader\\Sun\\saa";
     password="xxxxxx";
     mbox="INBOX";
     /*for (optind = 0; optind < argv.length; optind++) {
     if (argv[optind].equals("-T")) {
          protocol = argv[++optind];
     } else if (argv[optind].equals("-H")) {
          host = argv[++optind];
     } else if (argv[optind].equals("-U")) {
          user = argv[++optind];
     } else if (argv[optind].equals("-P")) {
          password = argv[++optind];
     } else if (argv[optind].equals("-v")) {
          verbose = true;
     } else if (argv[optind].equals("-D")) {
          debug = true;
     } else if (argv[optind].equals("-f")) {
          mbox = argv[++optind];
     } else if (argv[optind].equals("-L")) {
          url = argv[++optind];
     } else if (argv[optind].equals("-p")) {
          port = Integer.parseInt(argv[++optind]);
     } else if (argv[optind].equals("-s")) {
          showStructure = true;
     } else if (argv[optind].equals("-m")) {
          showMessage = true;
     } else if (argv[optind].equals("--")) {
          optind++;
          break;
     } else if (argv[optind].startsWith("-")) {
          System.out.println(
"Usage: msgshow [-L url] [-T protocol] [-H host] [-p port] [-U user]");
          System.out.println(
"\t[-P password] [-f mailbox] [msgnum] [-v] [-D] [-s]");
          System.out.println(
"or msgshow -m [-v] [-D] [-s] < msg");
          System.exit(1);
     } else {
          break;
     try {
     // if (optind < argv.length)
     // msgnum = Integer.parseInt(argv[optind]);
          //msgnum = 5;
     // Get a Properties object
     Properties props = System.getProperties();
     // Get a Session object
     Session session = Session.getDefaultInstance(props, null);
     session.setDebug(debug);
     if (showMessage) {
          MimeMessage msg = new MimeMessage(session, System.in);
          dumpPart(msg);
          System.exit(0);
     // Get a Store object
     Store store = null;
     if (url != null) {
          URLName urln = new URLName(url);
          store = session.getStore(urln);
          store.connect();
     } else {
          if (protocol != null)
          store = session.getStore(protocol);
          else
          store = session.getStore();
          // Connect
          if (host != null || user != null || password != null)
          store.connect(host, port, user, password);
          else
          store.connect();
     // Open the Folder
     Folder folder = store.getDefaultFolder();
     if (folder == null) {
          System.out.println("No default folder");
          System.exit(1);
     folder = folder.getFolder(mbox);
     if (folder == null) {
          System.out.println("Invalid folder");
          System.exit(1);
     // try to open read/write and if that fails try read-only
     try {
          folder.open(Folder.READ_WRITE);
     } catch (MessagingException ex) {
          folder.open(Folder.READ_ONLY);
     int totalMessages = folder.getMessageCount();
     if (totalMessages == 0) {
          System.out.println("Empty folder");
          folder.close(false);
          store.close();
          System.exit(1);
     if (verbose) {
          int newMessages = folder.getNewMessageCount();
          System.out.println("Total messages = " + totalMessages);
          System.out.println("New messages = " + newMessages);
          System.out.println("-------------------------------");
     if (msgnum == -1) {
          // Attributes & Flags for all messages ..
          Message[] msgs = folder.getMessages();
          // Use a suitable FetchProfile
          FetchProfile fp = new FetchProfile();
          fp.add(FetchProfile.Item.ENVELOPE);
          fp.add(FetchProfile.Item.FLAGS);
          fp.add("X-Mailer");
          folder.fetch(msgs, fp);
          for (int i = 0; i < msgs.length; i++) {
          System.out.println("--------------------------");
          System.out.println("MESSAGE #" + (i + 1) + ":");
          dumpEnvelope(msgs[i]);
          // dumpPart(msgs[i]);
     } else {
          System.out.println("Getting message number: " + msgnum);
          Message m = null;
          try {
          m = folder.getMessage(msgnum);
          dumpPart(m);
          } catch (IndexOutOfBoundsException iex) {
          System.out.println("Message number out of range");
     folder.close(false);
     store.close();
     } catch (Exception ex) {
     System.out.println("Oops, got exception! " + ex.getMessage());
     ex.printStackTrace();
     System.exit(1);
     System.exit(0);
public static void dumpPart(Part p) throws Exception {
     if (p instanceof Message)
     dumpEnvelope((Message)p);
     /** Dump input stream ..
     InputStream is = p.getInputStream();
     // If "is" is not already buffered, wrap a BufferedInputStream
     // around it.
     if (!(is instanceof BufferedInputStream))
     is = new BufferedInputStream(is);
     int c;
     while ((c = is.read()) != -1)
     System.out.write(c);
     pr("CONTENT-TYPE: " + p.getContentType());
     String filename = p.getFileName();
     if (filename != null)
     pr("FILENAME: " + filename);
     * Using isMimeType to determine the content type avoids
     * fetching the actual content data until we need it.
     if (p.isMimeType("text/plain")) {
     pr("This is plain text");
     pr("---------------------------");
     if (!showStructure)
          System.out.println((String)p.getContent());
     } else if (p.isMimeType("multipart/*")) {
     pr("This is a Multipart");
     pr("---------------------------");
     Multipart mp = (Multipart)p.getContent();
     level++;
     int count = mp.getCount();
     for (int i = 0; i < count; i++)
          dumpPart(mp.getBodyPart(i));
     level--;
     } else if (p.isMimeType("message/rfc822")) {
     pr("This is a Nested Message");
     pr("---------------------------");
     level++;
     dumpPart((Part)p.getContent());
     level--;
     } else if (!showStructure) {
     * If we actually want to see the data, and it's not a
     * MIME type we know, fetch it and check its Java type.
     Object o = p.getContent();
     if (o instanceof String) {
          pr("This is a string");
          pr("---------------------------");
          System.out.println((String)o);
     } else if (o instanceof InputStream) {
          pr("This is just an input stream");
          pr("---------------------------");
          InputStream is = (InputStream)o;
          int c;
          while ((c = is.read()) != -1)
          System.out.write(c);
     } else {
          pr("This is an unknown type");
          pr("---------------------------");
          pr(o.toString());
     } else {
     pr("This is an unknown type");
     pr("---------------------------");
public static void dumpEnvelope(Message m) throws Exception {
     pr("This is the message envelope");
     pr("---------------------------");
     Address[] a;
     // FROM
     if ((a = m.getFrom()) != null) {
     for (int j = 0; j < a.length; j++)
          pr("FROM: " + a[j].toString());
     // TO
     if ((a = m.getRecipients(Message.RecipientType.TO)) != null) {
     for (int j = 0; j < a.length; j++)
          pr("TO: " + a[j].toString());
     // SUBJECT
     pr("SUBJECT: " + m.getSubject());
     // DATE
     Date d = m.getSentDate();
     pr("SendDate: " +
     (d != null ? d.toString() : "UNKNOWN"));
     // FLAGS
     Flags flags = m.getFlags();
     StringBuffer sb = new StringBuffer();
     Flags.Flag[] sf = flags.getSystemFlags(); // get the system flags
     boolean first = true;
     for (int i = 0; i < sf.length; i++) {
     String s;
     Flags.Flag f = sf[i];
     if (f == Flags.Flag.ANSWERED)
          s = "\\Answered";
     else if (f == Flags.Flag.DELETED)
          s = "\\Deleted";
     else if (f == Flags.Flag.DRAFT)
          s = "\\Draft";
     else if (f == Flags.Flag.FLAGGED)
          s = "\\Flagged";
     else if (f == Flags.Flag.RECENT)
          s = "\\Recent";
     else if (f == Flags.Flag.SEEN)
          s = "\\Seen";
     else
          continue;     // skip it
     if (first)
          first = false;
     else
          sb.append(' ');
     sb.append(s);
     String[] uf = flags.getUserFlags(); // get the user flag strings
     for (int i = 0; i < uf.length; i++) {
     if (first)
          first = false;
     else
          sb.append(' ');
     sb.append(uf[i]);
     pr("FLAGS: " + sb.toString());
     // X-MAILER
     String[] hdrs = m.getHeader("X-Mailer");
     if (hdrs != null)
     pr("X-Mailer: " + hdrs[0]);
     else
     pr("X-Mailer NOT available");
static String indentStr = " ";
static int level = 0;
* Print a, possibly indented, string.
public static void pr(String s) {
     if (showStructure)
     System.out.print(indentStr.substring(0, level * 2));
     System.out.println(s);
This code is to move the message into a file
import javax.mail.*;
import com.sun.mail.pop3.*;
import javax.mail.internet.*;
import javax.activation.*;
import java.util.*;
import java.io.*;
//This class copies the content of the received e-mail into files. The file names are given by
//the urgent flag value and the subject
public class MoveMessageTo {
     boolean createdFile = true;
     static final byte urgentFlagPos=13;
     public MoveMessageTo() {
     public MoveMessageTo(Message[] msgs) {
          if(msgs.length != 0)
          try {
               for(int i = 0;i<msgs.length ;i++){
                    //Reads the content of the mail into an Object
                    Object currMultipart = msgs[i].getContent();
                    //converts this object into a String and then to a byte array, so we can read the urgnet flag
                    String content=(String)currMultipart;
                    byte[] testBytes=content.getBytes();
                    //The urgent flag is the first digit in the filename
                    StringBuffer fileName=new StringBuffer();
                    if (testBytes.length>urgentFlagPos)
                         fileName.append(new Byte(testBytes[urgentFlagPos]).toString());
                    //Then comes the subject of the e-mail
                    String mailSubject=msgs[i].getSubject();
                    if (mailSubject.length()>0)
                         fileName.append(mailSubject);
                    else fileName.append("noSubject");
                    fileName.append(".dat");
                    //create a directory to save the files
                    File baseDir = new File("c:/EMails/New");
                    baseDir.mkdirs();
                    //create file for with the subject as name
                    File eFile = new File(baseDir+"/"+fileName.toString());// creates a file by name of email subject
                    //Opening an stream for writting to the files
                    BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(eFile));
                    ObjectOutputStream oos = new ObjectOutputStream(bos);
                    //Writing the message body to the file
                    oos.writeObject(currMultipart) ;
                    //Closing the stream
                    oos.flush() ;
                    oos.close() ;
                    createdFile = true;
          }catch (Exception ex) {
               createdFile = false;
               System.out.println("eFile is not created ");
               ex.printStackTrace() ;
     public static void main(String[] args) {
          MoveMessageTo moveMessageTo1 = new MoveMessageTo();
This code is if there is an error in reading a file it will write those error into the file
import java.io.*;
import javax.swing.*;
import java.awt.Color;
import javax.swing.border.*;
//This class appends an error message to the log file
public class ErrorLogWriter {
     //JPanel jPanel2 = new JPanel();
     //Border border1;
     String logDirectory="c:/EMails/log/";
     File errFile; //= new File(errDir+"/"+"errorLog.dat");
     //The constructor initializes the errFile given the filename
     public ErrorLogWriter(String fileName) {
          errFile=new File(logDirectory+fileName);
          /*try {
               jbInit();
          }catch(Exception e) {
               e.printStackTrace();
     public void write(String writeStr){
          try {
               //Creates directory if doesn't exist
               File errDir = new File(logDirectory);
               errDir.mkdirs() ;
               //If the directory exists...
               if(errDir.isDirectory()){
                    //File errFile = new File(errDir+"/"+"errorLog.dat");
                    byte[] lastContent=new byte[0];
                    //If there is already a file with this name: Read its content so it can be preserved
                    if (errFile.exists()){
                         FileInputStream fis=new FileInputStream(errFile);
                         //Read everything into the byte array
                         lastContent=new byte[fis.available()];
                         fis.read(lastContent);
                    BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(errFile));
                    PrintWriter oos = new PrintWriter(bos);
                    String newWriteString=new String(lastContent);
                    writeStr.trim() ;
                    //Appends the new string to the old content
                    newWriteString+=writeStr;
                    newWriteString+="\n";
                    //writes everthing back to the file
                    oos.write(newWriteString) ;
                    oos.flush();
                    oos.close();
          }catch (Exception ex) {
               ex.printStackTrace() ;
     public static void main(String[] args) {
          ErrorLogWriter log = new ErrorLogWriter("logerror.log");
          log.write("Hello Log!") ;
All these file are in one package called SunMail and i run this in jbuilder in 4.0 ,I get the following error
eFile is not created
java.lang.ClassCastException: javax.mail.internet.MimeMultipart
     at MoveMessageTo.<init>(MoveMessageTo.java:26)
     at SunMailConnection.run(SunMailConnection.java:86)
     at SunMailConnection.start(SunMailConnection.java:118)
     at SunMailConnection.<init>(SunMailConnection.java:21)
     at SunMailConnection.main(SunMailConnection.java:133)
I know the it would be difficult if anyone could help me out it would be a great favour !!!
pls help me out of this !!!!

Similar Messages

  • Siri says she can't read my email from the iphone5s lock screen when I'm using the standard headphones, but I could do that on 4s. How can I get my 5s to do that?

    Siri says she can't read my email from the iphone5s lock screen when I'm using the standard headphones, but I could do that on 4s. How can I get my 5s to do that?

    Hi Liz,
    Sorry to hear you are having a similar problem.  Last night I went to the tool bar at the top of iphoto, clicked on "File",  then clicked "Browse Backups" in the drop down menu.    I have an external hard drive that is set up to Time Machine.   The Browse Backups  opened the iphoto pages in the Time Machine.  I selected a date one day ahead of the day I performed the now infamous update, and it showed my iphoto library as it had existed that day.   I then clicked  "Restore Library" at the bottom right corner of the Time Machine screen.   Roughly 2 hours later my iphoto was back to normal.   When I opened iphoto there was a message saying I need to upgrade my program to be compatible with the new version of iphoto(version 9.2.1).  I clicked "Upgrade" and within seconds it had done whatever upgrading it needed to do. 
    The only glitch in the restoration was that it restored the library as it appeared last week, so I no longer had photos I had imported this past weekend.   I simply went back to the Browse Backups in the drop down menu,  when Time Machine opened I selected the page showing my pictures from this weekend and again said to Restore Library.   Roughly 45 minutes later the library was restored including the most recent photos.  
    I am now a happy camper. 
    I don't know if any of this will be of help to you because your email says you are having trouble with photos imported after the upgrade was performed.   Have you had any pop up notices when you first open iphoto,  that tell you you need an upgrade to be compatible with the new iphoto?     If so have you clicked "upgrade"? 
    Good luck Liz,  if you have Time Machine running as a back up to your library, maybe you wil be able to get help there, by following my instructions above.   Otherwise,   good luck with your investigations.   I'd be interested in hearing how you make out.
    Karen

  • How do I read PDF files from the SARS website

    How do I read PDF files from the SARS website
    Got the latest version xi.0.08 of Abobe Reader
    Operating system is win XP Sp3

    You need Adobe Reader or Adobe Acrobat or other PDF reading application installed on your system. Then just double click on the form or publication wanted and follow the prompts as needed.

  • How can I retrieve deleted emails from the trash?

    How do I retrieve deleted emails from the trash?  I have not emptied the trash.

    Take a look at this post. Several posts should apply: https://discussions.apple.com/message/23461582#23461582

  • How to I stop getting email from the Apple Support Communities?

    How do I stop getting email from the Apple Support Communities?  I am being innundated with hundreds of emails daily.  Help~~

    If you are getting them from a forum as a whole (as opposed to just individual threads), then towards the top right of that forum page make sure that it says 'receive email notifications' in the Actions box :
    If it says 'stop email notifications' then click on it so as to stop them

  • TCP packet out of state: First packet isn't SYN & Outlook is trying to retrieve data from the Microsoft Exchange Server [CAS-ARray]

    We are transitioning from Exchange 2003 to Exchange 2010.  We found Outlook online mode (non-cached mode) have many warning "Outlook is trying to retrieve data from the Microsoft Exchange Server [CAS-ARray]", usually happen when users tried to open
    address book but sometimes even normal operation like click the Send button.  The problem does not affect OWA and extremely rare when Outlook is running in cached mode.  Check the firewall logs, we notice a lot of "TCP Packet Out of State" drops.
    We have a lot from the CAS/HT to DC/GC on TCP_3268 and LDAP.  And the errors are "TCP packet out of state: First packet isn't SYN" with tcp_flags FIN-ACK, PUSH-ACK.
    We also have a lot from CAS/HT to the Outlook Clients on the static RPC port (TCP_59933).   And the errors are "TCP packet out of state: First packet isn't SYN" with tcp_flags FIN-ACK, PUSH-ACK and RST-ACK, ACK.
    This happens even on Outlook 2010 which I though it has TCP Keep Alive implmented to keep the session active within 1 hour. 
    Can somebody tell me if these out-of-state are the cause of our problem?  And how to fix it?
    THANK 1,000,000

    Hello AndyHWC,
    I did some consulting with our CAS team and received the following feedback to your post:
    It is difficult to determine what is causing resets without seeing the captures first hand however, the concern is that you are seeing dropped packets on the firewall logs.  Where is this firewall located?
    Based on the description "Check the firewall logs, we notice a lot of "TCP Packet Out of State" drops." and "We have a lot from the CAS/HT to DC/GC on TCP_3268 and
    LDAP." indicates to me that the firewall is between CAS and GC.  This not supported under any circumstances and would explain the issue they are seeing with clients trying to "retrieve data from the GC".
    If there is not a firewall between the GC and CAS then a Microsoft support engineer would need to have concurrent Netmon Captures from client, CAS, GC during the
    issue to analyze.  If only one GC exists consider adding another GC to handle the client requests and for fault tolerance.
    Also verify that all NIC card drivers are updated to the latest driver version
    More information about firewalls with Exchange 2007/2010
    http://msexchangeteam.com/archive/2009/10/21/452929.aspx
    http://technet.microsoft.com/en-us/library/bb232184(EXCHG.80).aspx
    You can install the Client Access server role on an Exchange 2007 computer that is running any other server roles except for the Edge Transport server role. You
    cannot install the Client Access server role on a computer that is installed in a cluster. Installation of a Client Access server in a perimeter network is not supported.
    http://technet.microsoft.com/en-us/library/dd577077(EXCHG.80).aspx
    “The Installation of a Client Access Server in a Perimeter Network Is Not Supported
    Issue You may want to install an Exchange 2007 Client Access server in a perimeter network. However, this type of installation is not supported in Exchange
    2007.
    Cause The Exchange 2007 Client Access server role is not supported in any configuration in which a firewall is located between the Client Access server
    and a Mailbox server or a domain controller. This includes firewall devices, firewall programs, or any program or device that is designed to restrict traffic between two network locations.
    For correct operation, Client Access servers require typical domain connectivity to domain controllers and global catalog servers. Because any devices
    or programs that restrict or reduce access to domain controllers or global catalog servers may affect the correct operation of the Client Access server, we do not support this type of configuration.
    Resolution To resolve this issue, move the Client Access servers to the internal network. For more information about the ports that Exchange 2007 uses
    for various services, see Data Path Security Reference.”
    Thanks,
    Kevin Ca - MSFT
    Kevin Ca - MSFT

  • How to delete a Gmail email from the iphone and have it remain on the iMac?

    I use Gmail and have the email accounts set up as "imap". I would like to be able to delete emails from my iPhone 5, yet have them remain on the server. I read on the internet that it can only be done by changing the accounts from imap to pop3 accounts. However, since I also have an iMac and an iPad 3, I still want to be able to sync these so the emails can be retrieved on any of the devices.
    I supose that the only way to do this is to remain with "imap" accounts. But, there may be another problem. I was under the assumption that once the iPhone reaches a total of 200 messages, it will start to delete any above this amount. In this case, I will start to lose my messages on the server. Even if this is not the case, I don't want the mobile devices to end up with hundreds of emails that I would like saved.
    My question is this: How can I save the emails from the Gmail account to a separate set of folders that will archive these forever (if I choose)?  Can a folder be set up on the iMac with subfolders for each category that I want? If so, how is the actual move of the email done? Can it be copied to the new folder immediately so that later when it is deleted from the Gmail account, it is permanently saved in the new Mac folder?    Thanks

    Hello Kailua,
    I know that you can mirror you iPhone's display onto a Apple TV, as can you with the Mac, but I do not think you can mirror your iPhone to your iMac.
    Sincerely,
    Devin

  • Is it possible to read , send emails from the database in oracle8.

    Hi,
    My present project needs me to send emails from the database through procedures. There is an oracle package UTL_HTTP in oracle8 which could be used to read emails from database. So kindly tell how to go about sending an email from the database. Is this feature available in Oracle8i.
    Thank you.

    Okay , Here's my Javascript wgich is in an onload process.
    Javascript variable addr_str displays the correct result.
    My hidden field is called P101_CHECKVAL.
    <html>
    <title>CodeAve.com(JavaScript: Display All URL Variables)</title>
    <body bgcolor="#FFFFFF">
    <script language="JavaScript">
    <!--
    // Create variable is_input to see if there is a ? in the url
    var is_input = document.URL.indexOf('P101_CHECKVAL:');
    // Check the position of the ? in the url
    if (is_input != -1)
    // Create variable from ? in the url to the end of the string
    addr_str = document.URL.substring(is_input+1, document.URL.length);
    // Loop through the url and write out values found
    // or a line break to seperate values by the &
    for (count = 0; count < addr_str.length; count++)
    if (addr_str.charAt(count) == "&")
    // Write a line break for each & found
    {document.write ("<br>");}
    else
    // Write the part of the url
    {document.write (addr_str.charAt(count));}
    // If there is no ? in the url state no values found
    else
    {document.write("No values detected");}
    -->
    </script>
    </body>
    </html>
    Everytime I put the HTML_get code into the javascript, it basically tells me I have an error on the page. So what exactly do I put that sets P101_CHECKVAL equal to the value of addr_str?

  • Cannot recieve emails from the yahoo POP server in linux

    I am sure POP was activated in yahoo settings because I just checked.

    ''hkraus07 [[#question-1051641|said]]''
    <blockquote>
    During the last few months my Thunderbird email account has been receiving many duplicates of emails from the yahoo (AT&T) server. This happens only when I receive e-mails that have large attachments like multiple photos. My spouse has the same problem on her email account. Frequently I receive 25 duplicates of the same email in my inbox.
    I'm on Thunderbird release 31.5.0.
    My server setting is = pop.att.yahoo.com port = 995
    My Outgoing server name is = smtp.att.yahoo.com
    </blockquote>
    Antivirus Program = Microsoft Security Essentials
    Other system info:
    Thunderbird 31.5.0 with Yahoo (AT&T) webmail.
    TB Server Name = pop.att.yahoo.com, port = 995, SSL/TLS.
    Outgoing Server (SMTP) settings = smtp.att.yahoo.com, port 465, SSL/TLS.
    Leave messages on server is UNCHECKED.
    Windows XP, Version 2002 SP3.
    Pentium 4, 2.66 GHz CPU, 2.5 GB RAM.
    TB Email used to work perfectly for many years with these settings and equipment. A few months ago me & my wife's TB email accounts began to receive over thirty duplicates of any emails in our inbox that have large attachments like photos.

  • How to Send Foreign Language Email from the iPhone

    See this site for online keyboards for some other languages which can be used to generate a mail message from the iPhone.
    http://pointatme.com/keyboards/keyboard.html

    The keyboard included in the current version of the iPhone is limited to English. But at this site you will find online keyboards for some European languages which can be used to generate a mail message from the iPhone.
    http://pointatme.com/keyboards/
    And if you point the iPhone browser to this page you can send email in Japanese:
    http://n.h7a.org/iphone/mail/

  • How can i read outlook emails (from my Dell) on my mac?

    Hi!  I have saved all my outlook emails from my PC to a hard drive and want to view them on my macbook.  Do i have to buy the full office/outlook software package or is there another way to read them?
    I have word and xls on my mac from buying the student office package... but want to avoid buying it all again if i can just read the emails on another reader or just buy the outlook email software...
    Thanks
    Graham

    can annyone assist me whit this problem?
    Not without providing more information about the type of email account (POP3, IMAP, or Exchange) and what settings you use in the account

  • How do you move POP3 email from the iPhone back to the server or computer?

    Is there any way to get email that was downloaded to the iPhone using POP3 back on the server or computer? (other than resending all the mail)

    You're welcome.
    Although it is possible to access a POP account with more than one email client, a POP account is really designed to be accessed with a single email client only.
    I access a MobileMe account and a business POP account with the iPhone's mail client. Since an IMAP account is designed to be accessed with more than one email client keeping all server stored mailboxes synchronized with the server automatically with each email client used to access the account, accessing an IMAP account with the iPhone's mail client is much more preferable to me. All sent messages are available with each email email client used to access the account. Read a received message with the iPhone's mail client and the message will be marked as read automatically when checking the account with the email client on my computer and vice-versa. I create additional server stored mailboxes to store received and sent messages by category and I can transfer messages from the account's Inbox or Sent mailbox to the designated server stored mailbox with the iPhone's mail client, with all server stored mailboxes kept synchronized with the server automatically with each email client used to access the account.
    If messages were removed from the server with the email client used on your computer to access the account - transferred to a mailbox stored locally on your hard drive, you can transfer the messages back to the designated server stored mailbox.
    Need to delete and recreate the account with your iPhone's mail client, or need to restore your iPhone with iTunes, all messages that don't remain on the server will be lost with a POP account including all messages sent with the account from the iPhone - which can be stored locally on the iPhone only unless you always Bcc yourself with every sent message.
    Delete and recreate an IMAP account with the iPhone's mail client and all server stored mailboxes and the messages within will be available again automatically.
    IMAP account access is the way to go with the iPhone IMO.

  • How can I read a email from a POP3-Server?

    Hallo,
    I want to read emails from a POP3-Server.  Also attached files.
    I use LabVIEW 7.0 and the Internet toolkit.
    Any suggestions?
    Thank you
    Thomas

    Hallo Thomas,
    2 suggestions :
     - first go to Help >> Seach examples... and search for pop mail, no doubt you'll find somtehing.
     - then have a look at that thread, there are some informations you might want to know before coding
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • How do you select multiple emails from the contacts book.

    Using 10.8.4. I would like to use mail and select multiple email address' from the contacts book to send the same message to multiple persons. I thought I used to be able to select more than one at a time from my contacts book. Am I crazy or did they change the way it works from the previous version of software.
    Or, could you go to the contacts book and email from there. Either way it seems like it was easy to do and now I have to select one at a time and keep going back to the contacts/address book for another name.

    Hi shelereric,
    Once you open a new message, you should be able to just start typing the first letters of the contact's name, and Mail should give you a dropdown to select from:
    So, you should not have to go back and forth between your contacts and mail....anyone in your address book should show up on the dropdown as well as anyone you have received emails from or sent emails to even if they are not in your contacts....
    Is that not what is happening for you? Are you using the Mail app on the Mac?
    Cheers,
    GB

  • How to send PLAIN text email from sp_send_dbmail using SQL Server 2008 R2?

    I have configured Database Mail in SQL Server 2008 R2 (64) and it sends emails just fine. However the destination is recieving the body of thes message as Base 64 encoding.
    Snippet:
    EXEC msdb..sp_send_dbmail @profile_name='Outmail', @recipients = @recpts, @subject = @subj, @body_format = 'TEXT', @body=@body2;
    As you can see I set @body_format to TEXT, but it still sends Base 64. I need to send plain ASCII text. How can I change this?

    I am having this exact issue too.  I have a trigger that sends an email using a stored procedure.  The dbmail is sending the email using the Exchange 2010 server SMTP.  It does not login so the email is relayed as user = "Anonymous". 
    The SQL dbmail email header is showing the following:
    Content-Type: text/plain; charset="utf-8"
    Content-Transfer-Encoding: base64
    MIME-Version: 1.0
    X-MS-Exchange-Organization-AuthSource: MX01.domain.local
    X-MS-Exchange-Organization-AuthAs: Anonymous
    Here is the header if I send via Outlook profile using the legacy program I am trying to automate using SQL Server 2008R2:
    Content-Type: application/ms-tnef; name="winmail.dat"
    Content-Transfer-Encoding: binary
    MIME-Version: 1.0
    X-MS-Has-Attach:
    X-MS-Exchange-Organization-SCL: -1
    X-MS-TNEF-Correlator: <[email protected]>
    MIME-Version: 1.0
    X-MS-Exchange-Organization-AuthSource: MX01.domain.local
    X-MS-Exchange-Organization-AuthAs: Internal
    X-MS-Exchange-Organization-AuthMechanism: 03
    X-Originating-IP: [192.168.13.66]
    Any help would be greatly appreciated!

Maybe you are looking for

  • [Gnome 3] Uses for System Sound Alsa instead of Pulse Audio?!

    If I open "Sound Settings" click on the reiter "Applications" then I see which programs are currently playing sound. Because I have installed the freedesktop sound theme I hear some sound if I raise or lower the volume. But why does it listen that th

  • Oracle Linux 6 Login

    Hi I installed oracle linux 6 in my machine. After installation, linux is asking user name password. I specified the same password at time of installation, but i dont know the username. Anyone know, using which account I get into login?

  • Hi experts i need bapi related to promotion

    i need a bapi to upload promotion and change promotion please help

  • My safari won't work on my iPad

    My safari on my iPad mini hasn't worked for a couple months and every time I try to go on it won't load anything

  • Native dialogs in HTML/JS AIR?

    Hi there, My app is being developed in HTML/JS and deployed on Adobe AIR for Windows/Mac/Linux and PhoneGap on Android/iPad. This is going well, but while PhoneGap supports native dialogs, does Adobe AIR? I could obviously build my own with NativeWin