public ViewMail(List<Contact> contacts, LoginCred login, ImapX.Message msg)
        {
            InitializeComponent();
              this.login = login;
              this.message = msg;
              this.contacts = contacts;
              if (msg.Attachments.Length > 0)
            blnAttachments = true;
              else
            blnAttachments = false;
              if (!blnAttachments)
            b_ViewAttachments.Visible = false;
              try
              {
            tb_from.Text = String.Format("From: {0}", msg.From.ToString());
            tb_subject.Text = String.Format("Subject: {0}", msg.Subject);

            wb_msg.Navigate("about:blank");
            wb_msg.Document.Write(msg.Body.Html.ToString());
              }
              catch (Exception ex)
              {
            throw new ApplicationException("Email uid was not specified: " + ex.Message);
              }
        }
        public wuc_login(CImapClient srv, LoginCred login, Domains domains)
        {
            InitializeComponent();
              this.srv = srv;
              this.login = login;
              this.domains = domains;

              FillDomains();
        }
        public wuc_contactList(List<Contact> contacts, LoginCred login, bool openFromEmail = false)
        {
            this.contacts = contacts;
              this.login = login;
              this.openFromEmail = openFromEmail;

              InitializeComponent();

              FillContactListView();
        }
 /// <summary>
 /// Connects to the imap server.
 /// </summary>
 /// <param name="login">Login credidentials containing username and password of user</param>
 /// <param name="server">Server address to connect to</param>
 public void Connect(LoginCred login, string server)
 {
     imapc = new ImapClient(server, true);
       if (imapc.Connect())
     if (imapc.Login(login.Username, login.Password))
     {
       blnConnected = true;
       imapc.Behavior.AutoPopulateFolderMessages = true;
     }
 }
Example #5
0
        public MainWindow()
        {
            InitializeComponent();
              srv = new CImapClient();
              login = new LoginCred();

              GetDomains();
              GetContacts();

              AddLoginWuc();
        }
 public wuc_inbox(CImapClient srv, LoginCred login, List<Contact> contacts)
 {
     InitializeComponent();
       this.srv = srv;
       this.login = login;
       this.contacts = contacts;
       lv_messages.Columns[1].Width = 0;
       try
       {
     PopulateMailList();
       }
       catch (Exception ex)
       { }
 }
 public CImapClient(LoginCred login)
 {
     this.login = login;
 }