/*
 *  Copyright (C) 2007-2008 CMM Sigma Andrzej Chmielowiec <cmmsigma@cmmsigma.eu>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 3
 *  as published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 */

// MailConfig.h: interface for the CaOptions class.
//
//////////////////////////////////////////////////////////////////////

#ifndef MAILCONFIG_H
#define MAILCONFIG_H

#include <QXmlStreamWriter>
#include <QXmlStreamReader>
#include <QString>

struct MailConfig
{
	MailConfig();

	QString mUser;
	QString mMail;
	
	QString mSmtpServer;
	QString mSmtpUser;
	QString mSmtpPass;

	QString mReqFilter;
	
	QString mPop3Server;
	QString mPop3User;
	QString mPop3Pass;
	
	bool mOutgoingAuth;
	bool mUseIncomming;
	bool mUseMail;
	
	bool checkOutgoingConfig();
	bool checkIncommingConfig();

	void serialize(QXmlStreamWriter &xml);
	bool deserialize(QXmlStreamReader &xml);
};

#endif
