using System.Collections.Generic;

namespace InABox.Mail
{
    public interface ICoreMailer
    {
        string MailboxDomain { get; set; }
        string MailboxHost { get; set; }
        string MailboxPassword { get; set; }
        int MailboxPort { get; set; }
        string MailboxUserName { get; set; }
        string SMTPDomain { get; set; }
        string SMTPHost { get; set; }
        string SMTPPassword { get; set; }
        int SMTPPort { get; set; }
        string SMTPUserName { get; set; }

        bool IsConnected { get; }

        ICoreMailFolder Inbox { get; }
        ICoreMailFolder SentItems { get; }

        bool Connect();

        ICoreMailMessage CreateMessage();
        ICoreMailFolder FindFolder(ICoreMailFolder folder, string name);

        IEnumerable<ICoreMailSummary> ListMessages(ICoreMailFolder folder, int min = 0, int max = int.MaxValue);

        IEnumerable<ICoreMailMessage> GetMessages(ICoreMailFolder folder);

        ICoreMailMessage GetMessage(ICoreMailFolder folder, string id);

        bool MoveMessage(ICoreMailMessage message, ICoreMailFolder to);
        bool SendMessage(ICoreMailMessage message);
    }
}