Package org.jxchange.client.cdo121

Examples of org.jxchange.client.cdo121.JXCdoEnum$ActMsgRecipientType


                      System.out.print("|     ");
                  }
                  System.out.print("+----");
                  System.out.println(node.GetName());

                  JXCdoFolders sfs = new JXCdoFolders(jxCdoSession,node.GetFolders());
                  int ct = sfs.GetCount().getObjectAsInt();
                  for(int i = 1; i <= ct; i++){
                      listFolders(jxCdoSession,new JXCdoFolder(jxCdoSession,sfs.Item(new JIVariant(new Integer(i).intValue()))));
                  }
              }
          } catch (Exception e) {
              e.printStackTrace();
          }finally {
View Full Code Here


              JXCdoInfoStores ifss = new JXCdoInfoStores(jxCdoSession,jxCdoSession.GetInfoStores());
              int count = ifss.GetCount().getObjectAsInt();
              System.out.println("There are " + count + " Info Stores");

              for(int i=1; i<=count; i++){
                  JXCdoInfoStore ifs = new JXCdoInfoStore(jxCdoSession,ifss.Item(new JIVariant(new Integer(i).intValue())));
                  System.out.println("\t Info Store " + i + ": " + ifs.GetName());
              }

              // get the mailbox root folder
              // it is usually the second item in the list of info stores
              JXCdoInfoStore ifs = new JXCdoInfoStore(jxCdoSession,ifss.Item(new JIVariant(new Integer(2).intValue())));
              JXCdoFolder root = new  JXCdoFolder(jxCdoSession,ifs.GetRootFolder());

              // build a tree based on the mailbox folders structure
              listFolders(jxCdoSession,root);
             
      jxCdoSession.Logoff();
View Full Code Here

          new JIVariant(false), new JIVariant(true), new JIVariant(
              false), new JIVariant(false), new JIString(
              ICredentialBag.logoncred_profileinfo).Variant);

           // get the info stores
              JXCdoInfoStores ifss = new JXCdoInfoStores(jxCdoSession,jxCdoSession.GetInfoStores());
              int count = ifss.GetCount().getObjectAsInt();
              System.out.println("There are " + count + " Info Stores");

              for(int i=1; i<=count; i++){
                  JXCdoInfoStore ifs = new JXCdoInfoStore(jxCdoSession,ifss.Item(new JIVariant(new Integer(i).intValue())));
                  System.out.println("\t Info Store " + i + ": " + ifs.GetName());
              }

              // get the mailbox root folder
              // it is usually the second item in the list of info stores
              JXCdoInfoStore ifs = new JXCdoInfoStore(jxCdoSession,ifss.Item(new JIVariant(new Integer(2).intValue())));
              JXCdoFolder root = new  JXCdoFolder(jxCdoSession,ifs.GetRootFolder());

              // build a tree based on the mailbox folders structure
              listFolders(jxCdoSession,root);
             
View Full Code Here

              ICredentialBag.logoncred_profileinfo).Variant);

     
            JXCdoFolder outbox = new JXCdoFolder(jxCdoSession,jxCdoSession.GetDefaultFolder(new JIVariant(JXCdoEnum.CdoDefaultFolderTypes.CdoDefaultFolderOutbox.intValue())));
            JXCdoMessages messages = new JXCdoMessages(jxCdoSession,outbox.GetMessages());
            JXCdoMessage message = new JXCdoMessage(jxCdoSession,messages.Add(new JIString("").Variant, new JIString("").Variant, JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM()));

            // set message subject and body
            message.SetSubject(new JIString("Test JXCdoMessage").Variant);
            message.SetText(new JIString("This is a test message sent from a Java program through j-XChange.").Variant);

            // set message recipients
            JXCdoRecipients recipients = new JXCdoRecipients(jxCdoSession,message.GetRecipients());
            JXCdoRecipient r1 = new JXCdoRecipient(jxCdoSession,recipients.Add(JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM()));
            JXCdoRecipient r2 = new JXCdoRecipient(jxCdoSession,recipients.Add(JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM()));

            // set recipients' addresses
            r1.SetName(new JIString("dont@spam.com").Variant);
            r2.SetName(new JIString("dont@spam2.com").Variant);

            // r1 will be the 'to' address and r2 will be 'cc'-ied
            r1.SetType(new JIVariant(JXCdoEnum.CdoRecipientType.CdoTo.intValue()));
            r2.SetType(new JIVariant(JXCdoEnum.CdoRecipientType.CdoCc.intValue()));

            // Each recipient added must be resolved before it can be used.
            // 0 == false to inhibit dialog boxes from popping up
            r1.Resolve(new JIVariant(0));
            r2.Resolve(new JIVariant(0));

            // set the attachment
//            Attachments attachments = new AttachmentsProxy(message.getAttachments());
//            Attachment attachment = new AttachmentProxy(attachments.add(null, null, null, null));
//            attachment.setSource("c:\\temp\\attach.doc");

            // save changes to the message
            message.Update(new JIVariant(true), new JIVariant(true));

            // and finally, send the message
            message.Send(JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM());

             
      jxCdoSession.Logoff();
    } catch (UnknownHostException e) {
      // TODO Auto-generated catch block
View Full Code Here

              false), new JIVariant(false), new JIString(
              ICredentialBag.logoncred_profileinfo).Variant);

     
            JXCdoFolder outbox = new JXCdoFolder(jxCdoSession,jxCdoSession.GetDefaultFolder(new JIVariant(JXCdoEnum.CdoDefaultFolderTypes.CdoDefaultFolderOutbox.intValue())));
            JXCdoMessages messages = new JXCdoMessages(jxCdoSession,outbox.GetMessages());
            JXCdoMessage message = new JXCdoMessage(jxCdoSession,messages.Add(new JIString("").Variant, new JIString("").Variant, JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM()));

            // set message subject and body
            message.SetSubject(new JIString("Test JXCdoMessage").Variant);
            message.SetText(new JIString("This is a test message sent from a Java program through j-XChange.").Variant);
View Full Code Here

            message.SetSubject(new JIString("Test JXCdoMessage").Variant);
            message.SetText(new JIString("This is a test message sent from a Java program through j-XChange.").Variant);

            // set message recipients
            JXCdoRecipients recipients = new JXCdoRecipients(jxCdoSession,message.GetRecipients());
            JXCdoRecipient r1 = new JXCdoRecipient(jxCdoSession,recipients.Add(JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM()));
            JXCdoRecipient r2 = new JXCdoRecipient(jxCdoSession,recipients.Add(JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM()));

            // set recipients' addresses
            r1.SetName(new JIString("dont@spam.com").Variant);
            r2.SetName(new JIString("dont@spam2.com").Variant);

            // r1 will be the 'to' address and r2 will be 'cc'-ied
            r1.SetType(new JIVariant(JXCdoEnum.CdoRecipientType.CdoTo.intValue()));
            r2.SetType(new JIVariant(JXCdoEnum.CdoRecipientType.CdoCc.intValue()));

            // Each recipient added must be resolved before it can be used.
            // 0 == false to inhibit dialog boxes from popping up
            r1.Resolve(new JIVariant(0));
            r2.Resolve(new JIVariant(0));

            // set the attachment
//            Attachments attachments = new AttachmentsProxy(message.getAttachments());
//            Attachment attachment = new AttachmentProxy(attachments.add(null, null, null, null));
//            attachment.setSource("c:\\temp\\attach.doc");
View Full Code Here

            // set message subject and body
            message.SetSubject(new JIString("Test JXCdoMessage").Variant);
            message.SetText(new JIString("This is a test message sent from a Java program through j-XChange.").Variant);

            // set message recipients
            JXCdoRecipients recipients = new JXCdoRecipients(jxCdoSession,message.GetRecipients());
            JXCdoRecipient r1 = new JXCdoRecipient(jxCdoSession,recipients.Add(JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM()));
            JXCdoRecipient r2 = new JXCdoRecipient(jxCdoSession,recipients.Add(JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM()));

            // set recipients' addresses
            r1.SetName(new JIString("dont@spam.com").Variant);
            r2.SetName(new JIString("dont@spam2.com").Variant);
View Full Code Here

   */
  public static void main(String[] args) {
    // TODO Auto-generated method stub
    JISystem.setAutoRegisteration(true);
    try {
      JXCdoSession jxCdoSession = new JXCdoSession("localhost",
          "localhost", "vikram", "vikram");
      jxCdoSession.Logon(new JIString("vikram_roopchand").Variant,
          new JIString("Password").Variant, new JIVariant(false),
          new JIVariant(true), new JIVariant(false), new JIVariant(
              false), new JIString(
              "PUNAXCHEMBPIN02.enterprise.corp.com" + "\n"
                  + "vikram_roopchand").Variant);
      System.out.println(jxCdoSession.GetCurrentUser());
      System.out.println(jxCdoSession.GetCdoClass());
      jxCdoSession.Logoff();
    } catch (UnknownHostException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (JIException e) {
      // TODO Auto-generated catch block
View Full Code Here

  public static void main(String[] args)
  {
    // TODO Auto-generated method stub
    JISystem.setAutoRegisteration(true);
    try {
      JXCdoSession jxCdoSession = new JXCdoSession(
          ICredentialBag.machinecred_cdoinstalledhost,
          ICredentialBag.machinecred_domain,
          ICredentialBag.machinecred_username,
          ICredentialBag.machinecred_password);
      jxCdoSession.Logon(new JIString(
          ICredentialBag.logoncred_profilename).Variant,
          new JIString(ICredentialBag.logoncred_password).Variant,
          new JIVariant(false), new JIVariant(true), new JIVariant(
              false), new JIVariant(false), new JIString(
              ICredentialBag.logoncred_profileinfo).Variant);

           // get the info stores
              JXCdoInfoStores ifss = new JXCdoInfoStores(jxCdoSession,jxCdoSession.GetInfoStores());
              int count = ifss.GetCount().getObjectAsInt();
              System.out.println("There are " + count + " Info Stores");

              for(int i=1; i<=count; i++){
                  JXCdoInfoStore ifs = new JXCdoInfoStore(jxCdoSession,ifss.Item(new JIVariant(new Integer(i).intValue())));
                  System.out.println("\t Info Store " + i + ": " + ifs.GetName());
              }

              // get the mailbox root folder
              // it is usually the second item in the list of info stores
              JXCdoInfoStore ifs = new JXCdoInfoStore(jxCdoSession,ifss.Item(new JIVariant(new Integer(2).intValue())));
              JXCdoFolder root = new  JXCdoFolder(jxCdoSession,ifs.GetRootFolder());

              // build a tree based on the mailbox folders structure
              listFolders(jxCdoSession,root);
             
      jxCdoSession.Logoff();
    } catch (UnknownHostException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (JIException e) {
      // TODO Auto-generated catch block
View Full Code Here

  public static void main(String[] args)
  {
    // TODO Auto-generated method stub
    JISystem.setAutoRegisteration(true);
    try {
      JXCdoSession jxCdoSession = new JXCdoSession(
          ICredentialBag.machinecred_cdoinstalledhost,
          ICredentialBag.machinecred_domain,
          ICredentialBag.machinecred_username,
          ICredentialBag.machinecred_password);
      jxCdoSession.Logon(new JIString(
          ICredentialBag.logoncred_profilename).Variant,
          new JIString(ICredentialBag.logoncred_password).Variant,
          new JIVariant(false), new JIVariant(true), new JIVariant(
              false), new JIVariant(false), new JIString(
              ICredentialBag.logoncred_profileinfo).Variant);
          JXCdoAddressEntry user = new JXCdoAddressEntry(jxCdoSession,jxCdoSession.GetCurrentUser());
      System.out.println("Current user: " + user.GetName().getObjectAsString().getString());
      jxCdoSession.Logoff();
    } catch (UnknownHostException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (JIException e) {
      // TODO Auto-generated catch block
View Full Code Here

TOP

Related Classes of org.jxchange.client.cdo121.JXCdoEnum$ActMsgRecipientType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.