summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/mail
diff options
context:
space:
mode:
Diffstat (limited to 'offapi/com/sun/star/mail')
-rw-r--r--offapi/com/sun/star/mail/MailAttachment.idl67
-rw-r--r--offapi/com/sun/star/mail/MailException.idl49
-rw-r--r--offapi/com/sun/star/mail/MailMessage.idl111
-rw-r--r--offapi/com/sun/star/mail/MailServer.idl65
-rw-r--r--offapi/com/sun/star/mail/MailServiceProvider.idl62
-rw-r--r--offapi/com/sun/star/mail/MailServiceType.idl50
-rw-r--r--offapi/com/sun/star/mail/NoMailServiceProviderException.idl52
-rw-r--r--offapi/com/sun/star/mail/NoMailTransportProviderException.idl52
-rw-r--r--offapi/com/sun/star/mail/SendMailMessageFailedException.idl68
-rw-r--r--offapi/com/sun/star/mail/XAuthenticator.idl66
-rw-r--r--offapi/com/sun/star/mail/XConnectionListener.idl73
-rw-r--r--offapi/com/sun/star/mail/XMailMessage.idl158
-rw-r--r--offapi/com/sun/star/mail/XMailServer.idl279
-rw-r--r--offapi/com/sun/star/mail/XMailService.idl229
-rw-r--r--offapi/com/sun/star/mail/XMailServiceProvider.idl70
-rw-r--r--offapi/com/sun/star/mail/XSmtpService.idl107
-rw-r--r--offapi/com/sun/star/mail/makefile.mk58
17 files changed, 1616 insertions, 0 deletions
diff --git a/offapi/com/sun/star/mail/MailAttachment.idl b/offapi/com/sun/star/mail/MailAttachment.idl
new file mode 100644
index 000000000000..a30aadfa0304
--- /dev/null
+++ b/offapi/com/sun/star/mail/MailAttachment.idl
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_MailAttachment_idl__
+#define __com_sun_star_mail_MailAttachment_idl__
+
+#ifndef __com_sun_star_datatransfer_XTransferable_idl__
+#include <com/sun/star/datatransfer/XTransferable.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+/**
+ A <type>MailAttachment</type> specifies a mail message attachment.
+
+ @see ::com::sun::star::mail::XMailMessage
+
+ @since OOo 2.0.0
+*/
+struct MailAttachment
+{
+ /**
+ The actual data which should be attached to a mail message.
+ It is expected that the transferable delivers the data as
+ sequence of bytes. Although a transferable may support
+ multiple data flavors only the first data flavor supplied
+ will be used to retrive the data and it is expected that
+ the type of the data is a sequence of bytes.
+
+ @see ::com::sun::star::datatransfer::XTransferable
+ */
+ ::com::sun::star::datatransfer::XTransferable Data;
+
+ /**
+ The name of the attachment as seen by the recipient of the
+ mail message. ReadableName must not be empty.
+ */
+ string ReadableName;
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/MailException.idl b/offapi/com/sun/star/mail/MailException.idl
new file mode 100644
index 000000000000..5f5bfff11f81
--- /dev/null
+++ b/offapi/com/sun/star/mail/MailException.idl
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_MailException_idl__
+#define __com_sun_star_mail_MailException_idl__
+
+#ifndef __com_sun_star_uno_Exception_idl__
+#include <com/sun/star/uno/Exception.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+/**
+ An MailException is the base of all mail related
+ exceptions.
+
+ @since OOo 2.0.0
+ */
+exception MailException: com::sun::star::uno::Exception
+{
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/MailMessage.idl b/offapi/com/sun/star/mail/MailMessage.idl
new file mode 100644
index 000000000000..2112865d00f8
--- /dev/null
+++ b/offapi/com/sun/star/mail/MailMessage.idl
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_MailMessage_idl__
+#define __com_sun_star_mail_MailMessage_idl__
+
+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#endif
+
+#ifndef __com_sun_star_mail_MailAttachment_idl__
+#include <com/sun/star/mail/MailAttachment.idl>
+#endif
+
+#ifndef __com_sun_star_datatransfer_XTransferable_idl__
+#include <com/sun/star/datatransfer/XTransferable.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+interface XMailMessage;
+
+/**
+ @since OOo 2.0.0
+ */
+service MailMessage: XMailMessage
+{
+ /**
+ Constructs an instance of a mail message.
+
+ @param sTo
+ [in] the e-mail address of the recipient.
+ The e-mail address has to conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>.
+
+ @param sFrom
+ [in] the e-mail address of the sender of this mail message.
+ The e-mail address has to conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>.
+
+ @param sSubject
+ [in] the subject of the mail message.
+
+ @param xBody
+ [in] the body of the mail message. It is expected that the
+ transferable delivers the data as a string. Although a
+ transferable may support multiple data flavors only the
+ first data flavor supplied will be used to retrieve the data
+ and it is expected that the data will be provided as a string.
+
+ @see com::sun::star::mail::XMailMessage
+ @see com::sun::star::datatransfer::XTransferable
+ */
+ create([in] string sTo, [in] string sFrom, [in] string sSubject, [in] com::sun::star::datatransfer::XTransferable xBody);
+
+ /**
+ Constructs an instance of a mail message.
+
+ @param sTo
+ [in] the e-mail address of the recipient.
+ The e-mail address has to conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>.
+
+ @param sFrom
+ [in] the e-mail address of the sender of this mail message.
+ The e-mail address has to conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>.
+
+ @param sSubject
+ [in] the subject of the mail message.
+
+ @param xBody
+ [in] the body of the mail message. It is expected that the
+ transferable delivers the data as a string. Although a
+ transferable may support multiple data flavors only the
+ first data flavor supplied will be used to retrieve the data
+ and it is expected that the data will be provided as a string.
+
+ @param aMailAttachment
+ [in] specifies an attachment which should be send with this mail message.
+
+ @see com::sun::star::mail::XMailMessage
+ @see com::sun::star::datatransfer::XTransferable
+ @see com::sun::star::mail::MailAttachment
+ */
+ createWithAttachment([in] string sTo, [in] string sFrom, [in] string sSubject, [in] com::sun::star::datatransfer::XTransferable xBody, [in] MailAttachment aMailAttachment);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/MailServer.idl b/offapi/com/sun/star/mail/MailServer.idl
new file mode 100644
index 000000000000..f6b448946eb4
--- /dev/null
+++ b/offapi/com/sun/star/mail/MailServer.idl
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_MailServer_idl__
+#define __com_sun_star_mail_MailServer_idl__
+
+#ifndef __com_sun_star_mail_NoMailTransportProviderException_idl__
+#include <com/sun/star/mail/NoMailTransportProviderException.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+interface XMailServer;
+
+/**
+ @since OOo 2.0.0
+ */
+service MailServer: XMailServer
+{
+ /**
+ Creation method.
+
+ @param sServerName
+ [in] the full qualified domain name of the mail server.
+
+ @throws com::sun::star::mail::NoMailTransportProviderException
+ if an appropriate provider for sending mail messages could not be found or
+ could not be created.
+
+ @throws com::sun::star::uno::Exception
+ on any other error which prevents the construction of an instance of this service.
+
+ @see com::sun::star::mail::XMailServer
+ */
+ create([in] string sServerName)
+ raises(com::sun::star::mail::NoMailTransportProviderException, com::sun::star::uno::Exception);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/MailServiceProvider.idl b/offapi/com/sun/star/mail/MailServiceProvider.idl
new file mode 100644
index 000000000000..af48d9e9b3e7
--- /dev/null
+++ b/offapi/com/sun/star/mail/MailServiceProvider.idl
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_MailServiceProvider_idl__
+#define __com_sun_star_mail_MailServiceProvider_idl__
+
+#ifndef __com_sun_star_mail_XMailServiceProvider_idl__
+#include <com/sun/star/mail/XMailServiceProvider.idl>
+#endif
+
+#ifndef __com_sun_star_mail_NoMailServiceProviderException_idl__
+#include <com/sun/star/mail/NoMailServiceProviderException.idl>
+#endif
+
+#ifndef __com_sun_star_mail_MailServiceType_idl__
+#include <com/sun/star/mail/MailServiceType.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+interface XMailService;
+
+/**
+ @since OOo 2.0.0
+ */
+service MailServiceProvider: XMailServiceProvider
+{
+ /**
+ Creation method.
+
+ @see com::sun::star::mail::XMailServiceProvider
+ */
+ create();
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/MailServiceType.idl b/offapi/com/sun/star/mail/MailServiceType.idl
new file mode 100644
index 000000000000..94aa985a06c2
--- /dev/null
+++ b/offapi/com/sun/star/mail/MailServiceType.idl
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_MailServiceType_idl__
+#define __com_sun_star_mail_MailServiceType_idl__
+
+module com { module sun { module star { module mail {
+
+/**
+ @since OOo 2.0.0
+ */
+enum MailServiceType
+{
+ /** A SMTP service */
+ SMTP,
+
+ /** A POP3 service */
+ POP3,
+
+ /** A IMAP service */
+ IMAP
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/NoMailServiceProviderException.idl b/offapi/com/sun/star/mail/NoMailServiceProviderException.idl
new file mode 100644
index 000000000000..a8e3d52396b9
--- /dev/null
+++ b/offapi/com/sun/star/mail/NoMailServiceProviderException.idl
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_NoMailServiceProviderException_idl__
+#define __com_sun_star_mail_NoMailServiceProviderException_idl__
+
+#ifndef __com_sun_star_mail_MailException_idl__
+#include <com/sun/star/mail/MailException.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+/**
+ A <type>NoMailServiceProviderException</type> will be thrown if an
+ appropriate provider for requested mail service could not be found or
+ could not be created.
+
+ @see com::sun::star::mail::MailService
+
+ @since OOo 2.0.0
+ */
+exception NoMailServiceProviderException: com::sun::star::mail::MailException
+{
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/NoMailTransportProviderException.idl b/offapi/com/sun/star/mail/NoMailTransportProviderException.idl
new file mode 100644
index 000000000000..3cad64b8f900
--- /dev/null
+++ b/offapi/com/sun/star/mail/NoMailTransportProviderException.idl
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_NoMailTransportProviderException_idl__
+#define __com_sun_star_mail_NoMailTransportProviderException_idl__
+
+#ifndef __com_sun_star_mail_MailException_idl__
+#include <com/sun/star/mail/MailException.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+/**
+ A <type>NoMailTransportProviderException</type> will be thrown if an
+ appropriate provider for sending mail messages could not be found or
+ could not be created.
+
+ @see com::sun::star::mail::MailServer
+
+ @since OOo 2.0.0
+ */
+exception NoMailTransportProviderException: com::sun::star::mail::MailException
+{
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/SendMailMessageFailedException.idl b/offapi/com/sun/star/mail/SendMailMessageFailedException.idl
new file mode 100644
index 000000000000..8987bf587596
--- /dev/null
+++ b/offapi/com/sun/star/mail/SendMailMessageFailedException.idl
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_SendMailMessageFailedException_idl__
+#define __com_sun_star_mail_SendMailMessageFailedException_idl__
+
+#ifndef __com_sun_star_mail_MailException_idl__
+#include <com/sun/star/mail/MailException.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+/**
+ A SendFailedException will be thrown if a mail message
+ could not be sent because the e-mail addresses of some
+ recipients are invalid. E-mail addresses have to conform
+ to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>.
+
+ @see com::sun::star::mail::XMailServer
+
+ @since OOo 2.0.0
+ */
+exception SendMailMessageFailedException: com::sun::star::mail::MailException
+{
+ /**
+ The addresses which are invalid because they do not conform
+ to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>.
+ */
+ sequence<string> InvalidAddresses;
+
+ /**
+ The addresses to which the mail message was sent successfully.
+ */
+ sequence<string> ValidSentAddresses;
+
+ /**
+ The addresses which are valid but to which the message was not sent.
+ */
+ sequence<string> ValidUnsentAddresses;
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/XAuthenticator.idl b/offapi/com/sun/star/mail/XAuthenticator.idl
new file mode 100644
index 000000000000..564ad4e484f1
--- /dev/null
+++ b/offapi/com/sun/star/mail/XAuthenticator.idl
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_XAuthenticator_idl__
+#define __com_sun_star_mail_XAuthenticator_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+/**
+ Represents an interface that will be used to query for user
+ information which are necessary to login to a network resource.
+ An implementation of this interface may for instance show a
+ dialog to query the user for the necessary data.
+
+ @since OOo 2.0.0
+ */
+interface XAuthenticator: ::com::sun::star::uno::XInterface {
+
+ /**
+ Will be called when the user name is needed.
+
+ @returns
+ the user name.
+ */
+ string getUserName();
+
+ /**
+ Will be called when the password of the user is needed.
+
+ @returns
+ the password of the user.
+ */
+ string getPassword();
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/XConnectionListener.idl b/offapi/com/sun/star/mail/XConnectionListener.idl
new file mode 100644
index 000000000000..5ca8511f7c97
--- /dev/null
+++ b/offapi/com/sun/star/mail/XConnectionListener.idl
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_XConnectionListener_idl__
+#define __com_sun_star_mail_XConnectionListener_idl__
+
+#ifndef __com_sun_star_lang_XEventListener_idl__
+#include <com/sun/star/lang/XEventListener.idl>
+#endif
+
+#ifndef __com_sun_star_lang_EventObject_idl__
+#include <com/sun/star/lang/EventObject.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+/**
+ The listener interface for connection events.
+
+ @see com::sun::star::mail::XMailServer
+
+ @since OOo 2.0.0
+ */
+interface XConnectionListener: ::com::sun::star::lang::XEventListener {
+
+ /**
+ Invoked when the connection to the mail server is established.
+
+ @param aEvent
+ [in] specific information regarding this event.
+
+ @see com::sun::star::lang::EventObject
+ */
+ void connected([in] com::sun::star::lang::EventObject aEvent);
+
+ /**
+ Invoked when the connection to the mail server is closed.
+
+ @param aEvent
+ [in] specific information regarding this event.
+
+ @see com::sun::star::lang::EventObject
+ */
+ void disconnected([in] com::sun::star::lang::EventObject aEvent);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/XMailMessage.idl b/offapi/com/sun/star/mail/XMailMessage.idl
new file mode 100644
index 000000000000..b87ea1ca6c5c
--- /dev/null
+++ b/offapi/com/sun/star/mail/XMailMessage.idl
@@ -0,0 +1,158 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_XMailMessage_idl__
+#define __com_sun_star_mail_XMailMessage_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+#ifndef __com_sun_star_mail_MailAttachment_idl__
+#include <com/sun/star/mail/MailAttachment.idl>
+#endif
+
+#ifndef __com_sun_star_datatransfer_XTransferable_idl__
+#include <com/sun/star/datatransfer/XTransferable.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+/**
+ Represents a mail message.
+
+ @see com::sun::star::mail::XMailServer
+
+ @since OOo 2.0.0
+ */
+interface XMailMessage: ::com::sun::star::uno::XInterface {
+
+ /**
+ The display name of the sender of this mail message.
+ */
+ [attribute, readonly] string SenderName;
+ /**
+ The e-mail address of the sender of this mail message.
+ The e-mail address has to conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>.
+ */
+ [attribute, readonly] string SenderAddress;
+
+ /**
+ The e-mail address where replies on this mail message should be sent to.
+ If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>
+ sending the mail message later will fail.
+ If no ReplyToAddress is set replies go to the SenderAddress.
+ */
+ [attribute] string ReplyToAddress;
+
+ /**
+ Add an recipients e-mail address to the list of recipients of this mail message.
+ If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>
+ sending the mail message will fail.
+
+ @param sRecipientAddress
+ [in] the e-mail address of the recipient.
+ */
+ void addRecipient([in] string sRecipientAddress);
+
+ /**
+ Add an Cc recipients e-mail address to the list of recipients of this mail message.
+ If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>
+ sending the mail message will fail.
+
+ @param sRecipientAddress
+ [in] the e-mail address of the Cc recipient.
+ */
+ void addCcRecipient([in] string sRecipientAddress);
+
+ /**
+ Add an Bcc recipients e-mail address to the list of recipients of this mail message.
+ If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>
+ sending the mail message will fail.
+
+ @param sRecipientAddress
+ [in] the e-mail address of the Bcc recipient.
+ */
+ void addBccRecipient([in] string sRecipientAddress);
+
+ /**
+ Return a sequence of the e-mail addresses of all recipients of
+ this mail message.
+ */
+ sequence<string> getRecipients();
+
+ /**
+ Return a sequence of the e-mail addresses of all the Cc recipients
+ of this mail message.
+ */
+ sequence<string> getCcRecipients();
+
+ /**
+ Return a sequence of the e-mail addresses of all the Bcc recipients
+ of this mail message.
+ */
+ sequence<string> getBccRecipients();
+
+ /**
+ The subject of a mail message.
+ */
+ [attribute] string Subject;
+
+ /**
+ The body of the mail message.
+ It is expected that the transferable delivers the data as
+ a string. Although a transferable may support multiple
+ data flavors only the first data flavor supplied will be
+ used to retrieve the data and it is expected that the data
+ will be provided as a string.
+
+ @see com::sun::star::datatransfer::XTransferable
+ */
+ [attribute] com::sun::star::datatransfer::XTransferable Body;
+
+ /**
+ Add a file attachment to a mail message.
+
+ param aMailAttachment
+ [in] specifies a file which should be attached to this mail message.
+
+ @see com::sun::star::mail::MailAttachment
+ */
+ void addAttachment([in] MailAttachment aMailAttachment);
+
+ /**
+ Return a sequence of <type>MailAttachment</type>'s that will
+ be attached to this mail message.
+
+ @see com::sun::star::mail::MailAttachment
+ */
+ sequence<MailAttachment> getAttachments();
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/XMailServer.idl b/offapi/com/sun/star/mail/XMailServer.idl
new file mode 100644
index 000000000000..8d0ad232ed61
--- /dev/null
+++ b/offapi/com/sun/star/mail/XMailServer.idl
@@ -0,0 +1,279 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_XMailServer_idl__
+#define __com_sun_star_mail_XMailServer_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+#ifndef __com_sun_star_mail_XAuthenticator_idl__
+#include <com/sun/star/mail/XAuthenticator.idl>
+#endif
+
+#ifndef __com_sun_star_mail_XMailMessage_idl__
+#include <com/sun/star/mail/XMailMessage.idl>
+#endif
+
+#ifndef __com_sun_star_auth_AuthenticationFailedException_idl__
+#include <com/sun/star/auth/AuthenticationFailedException.idl>
+#endif
+
+#ifndef __com_sun_star_io_AlreadyConnectedException_idl__
+#include <com/sun/star/io/AlreadyConnectedException.idl>
+#endif
+
+#ifndef __com_sun_star_io_NotConnectedException_idl__
+#include <com/sun/star/io/NotConnectedException.idl>
+#endif
+
+#ifndef __com_sun_star_io_UnknownHostException_idl__
+#include <com/sun/star/io/UnknownHostException.idl>
+#endif
+
+#ifndef __com_sun_star_io_NoRouteToHostException_idl__
+#include <com/sun/star/io/NoRouteToHostException.idl>
+#endif
+
+#ifndef __com_sun_star_io_ConnectException_idl__
+#include <com/sun/star/io/ConnectException.idl>
+#endif
+
+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#endif
+
+#ifndef __com_sun_star_ucb_InteractiveIOException_idl__
+#include <com/sun/star/ucb/InteractiveIOException.idl>
+#endif
+
+#ifndef __com_sun_star_mail_MailException_idl__
+#include <com/sun/star/mail/MailException.idl>
+#endif
+
+#ifndef __com_sun_star_mail_SendMailMessageFailedException_idl__
+#include <com/sun/star/mail/SendMailMessageFailedException.idl>
+#endif
+
+#ifndef __com_sun_star_mail_XConnectionListener_idl__
+#include <com/sun/star/mail/XConnectionListener.idl>
+#endif
+
+#ifndef __com_sun_star_datatransfer_UnsupportedFlavorException_idl__
+#include <com/sun/star/datatransfer/UnsupportedFlavorException.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+/**
+ Represents a mail server abstraction.
+
+ @see com::sun::star::mail::XMailMessage
+
+ @since OOo 2.0.0
+ */
+interface XMailServer: ::com::sun::star::uno::XInterface {
+
+ /**
+ The complete domain name of the mail server.
+ */
+ [attribute, readonly] string Name;
+
+ /**
+ The port number that will be used to connect to the mail server.
+ If no port number has been set the default port number 25 will
+ be used.
+ */
+ [attribute] long Port;
+
+ /**
+ Returns all connection types which are supported by the
+ mail server. Possible connection types are for instance
+ secure connections like 'SSL' or 'TLS'.
+
+ @returns
+ a sequence of supported connection types.
+ */
+ sequence<string> getSupportedConnectionTypes();
+
+ /**
+ Set the connection type that will be used to connect to the
+ mail server. The supported connection types may be queried
+ using <code>getSupportedConnectionTypes()</code>.
+ If no connection types has explicitly been set the default
+ connection type will be used.
+
+ @param sConnectionType
+ [in] identifies the connection that should be used to connect
+ to the mail server.
+
+ @throws com::sun::star::lang::IllegalArgumentException
+ if the provided connection type is not supported.
+
+ @see getSupportedConnectionTypes
+ @see isConnectionTypeSupported
+ */
+ void setConnectionType([in] string sConnectionType)
+ raises (com::sun::star::lang::IllegalArgumentException);
+
+ /**
+ Allow a client to query if a certain connection type is
+ supported.
+
+ @param sConnectionType
+ [in] query if a certain connection type is supported.
+
+ @returns
+ <TRUE/> if the specified connection type is supported.
+ */
+ boolean isConnectionTypeSupported([in] string sConnectionType);
+
+ /**
+ Register a connection listener.
+
+ @param xListener
+ [in] a listener that will be informed about connection events.
+
+ @see com::sun::star::mail::XConnectionListener
+ */
+ void addConnectionListener([in] XConnectionListener xListener);
+
+ /**
+ Unregister a connection listener.
+
+ @param xListener
+ [in] a listener that no longer need to be informed about connection events.
+
+ @see com::sun::star::mail::XConnectionListener
+ */
+ void removeConnectionListener([in] XConnectionListener xListener);
+
+ /**
+ Login a user to the mail server. Only one user may logged in
+ at a time. An attempt to login while another user is logged in
+ causes an exception to be thrown.
+
+ @param xAuthenticator
+ [in] an interface used to query for the necessary user information
+ needed to login to the mail server.
+
+ @throws com::sun::star::io::AlreadyConnectedException
+ on a try to connect to an already connect mail server.
+
+ @throws com::sun::star::io::UnknownHostException
+ usually if the IP address of the mail server could not be
+ determined. Possible causes are a broken network connection,
+ a wrong server name, an unreachable DNS server, etc.
+
+ @throws com::sun::star::io::NoRouteToHostException
+ if an error occured to connect to the remote mail server.
+ Typically the remote mail server cannot be reach because of an
+ intervening firewall, or if an intermediate router is down,
+ the network connection is broken, etc.
+
+ @throws com::sun::star::io::ConnectException
+ if an error occured while attempting to connect to the remote
+ mail server. Typically the connection was refused remotely,
+ because the mail server is not listening on the remote address/port.
+
+ @throws com::sun::star::auth::AuthenticationException
+ if the specified user could not be logged in.
+
+ @throws com::sun::star::mail::IllegalStateException
+ if a user is currently logged in.
+
+ @throws com::sun::star::mail::MailException
+ for other errors during login.
+
+ @see com::sun::star::mail::XAuthenticator
+ @see com::sun::star::io::AlreadyConnectedException
+ @see com::sun::star::io::UnknownHostException
+ @see com::sun::star::io::NoRouteToHostException
+ @see com::sun::star::io::ConnectException
+ @see com::sun::star::auth::AuthenticationException
+ @see com::sun::star::mail::IllegalStateException
+ @see com::sun::star::mail::MailException
+ */
+ void connectUser([in] XAuthenticator xAuthenticator)
+ raises(com::sun::star::io::AlreadyConnectedException,
+ com::sun::star::io::UnknownHostException,
+ com::sun::star::io::NoRouteToHostException,
+ com::sun::star::io::ConnectException,
+ com::sun::star::auth::AuthenticationFailedException,
+ com::sun::star::mail::MailException);
+
+ /**
+ Logoff the currently logged in user.
+
+ @throws com::sun::star::mail::MessagingException
+ if errors occur during logoff.
+ */
+ void disconnectUser()
+ raises(com::sun::star::mail::MailException);
+
+ /**
+ Returns whether a user is currently logged in to the mail server or not.
+
+ @returns
+ <TRUE/> if a user is currently logged in to the mail server.
+ */
+ boolean isUserConnected();
+
+ /**
+ Send a mail message to its recipients.
+
+ @throws com::sun::star::io::NotConnectedException
+ if no user is currently connected to the mail server.
+
+ @throws com::sun::star::mail::SendMailMessageFailedException
+ if the message could not be sent because of invalid recipient
+ addresses. The e-mail addresses of recipients have to conform to
+ <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>.
+
+ @throws com::sun::star::mail::MailException
+ is thrown on other errors that may happen during sending.
+ A possible reason may be for instance that a file attachment
+ specified in a mail message could not be found or accessed.
+
+ @throws com::sun::star::datatransfer::UnsupportedFlavorException
+ is thrown when the body of the mail message is provided in an
+ unsupported mime content type or may be thrown if one of the file
+ attachments specifies an unspupported mime content type.
+
+ @see com::sun::star::io::NotConnectedExceptionException
+ @see com::sun::star::mail::SendMailMessageFailedException
+ @see com::sun::star::mail::MailException
+ @see com::sun::star::datatransfer::UnsupportedFlavorException
+ */
+ void sendMailMessage([in] XMailMessage xMailMessage)
+ raises(com::sun::star::io::NotConnectedException, com::sun::star::mail::SendMailMessageFailedException, com::sun::star::mail::MailException, com::sun::star::datatransfer::UnsupportedFlavorException);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/XMailService.idl b/offapi/com/sun/star/mail/XMailService.idl
new file mode 100644
index 000000000000..cc8ba05e0703
--- /dev/null
+++ b/offapi/com/sun/star/mail/XMailService.idl
@@ -0,0 +1,229 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_XMailService_idl__
+#define __com_sun_star_mail_XMailService_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+#ifndef __com_sun_star_mail_XAuthenticator_idl__
+#include <com/sun/star/mail/XAuthenticator.idl>
+#endif
+
+#ifndef __com_sun_star_auth_AuthenticationFailedException_idl__
+#include <com/sun/star/auth/AuthenticationFailedException.idl>
+#endif
+
+#ifndef __com_sun_star_io_AlreadyConnectedException_idl__
+#include <com/sun/star/io/AlreadyConnectedException.idl>
+#endif
+
+#ifndef __com_sun_star_io_NotConnectedException_idl__
+#include <com/sun/star/io/NotConnectedException.idl>
+#endif
+
+#ifndef __com_sun_star_io_UnknownHostException_idl__
+#include <com/sun/star/io/UnknownHostException.idl>
+#endif
+
+#ifndef __com_sun_star_io_NoRouteToHostException_idl__
+#include <com/sun/star/io/NoRouteToHostException.idl>
+#endif
+
+#ifndef __com_sun_star_io_ConnectException_idl__
+#include <com/sun/star/io/ConnectException.idl>
+#endif
+
+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#endif
+
+#ifndef __com_sun_star_mail_XConnectionListener_idl__
+#include <com/sun/star/mail/XConnectionListener.idl>
+#endif
+
+#ifndef __com_sun_star_mail_MailException_idl__
+#include <com/sun/star/mail/MailException.idl>
+#endif
+
+#ifndef __com_sun_star_uno_XCurrentContext_idl__
+#include <com/sun/star/uno/XCurrentContext.idl>
+#endif
+
+
+module com { module sun { module star { module mail {
+
+/**
+ Represents a mail server abstraction.
+
+ @since OOo 2.0.0
+ */
+interface XMailService: ::com::sun::star::uno::XInterface {
+
+ /**
+ Returns all connection types which are supported to
+ connect to the mail service. At least support insecure
+ connections must be supported. Currently defined
+ connection types are (the values should be handled
+ case insensitive):
+ "Insecure" - insecure connections
+ "Ssl" - Secure Socket Layer 2.0/3.0 based connection
+
+ @returns
+ a sequence of supported connection types.
+ */
+ sequence<string> getSupportedConnectionTypes();
+
+ /**
+ Register a connection listener.
+
+ @param xListener
+ [in] a listener that will be informed about connection events.
+
+ @see com::sun::star::mail::XConnectionListener
+ */
+ void addConnectionListener([in] XConnectionListener xListener);
+
+ /**
+ Unregister a connection listener.
+
+ @param xListener
+ [in] a listener that no longer need to be informed about connection events.
+
+ @see com::sun::star::mail::XConnectionListener
+ */
+ void removeConnectionListener([in] XConnectionListener xListener);
+
+ /**
+ Return the context of the current connnection. The context
+ contains information like the server name, port, connection type
+ etc.
+
+ @precond
+ <code>isConnected</code> returns true.
+
+ @returns
+ the current connection context.
+
+ @throws com::sun::star::io::NotConnectedException
+ if no connection is currently established.
+
+ @see com::sun::star::mail::connectUser
+ @see com::sun::star::io::NotConnectedException
+ */
+ com::sun::star::uno::XCurrentContext getCurrentConnectionContext()
+ raises(com::sun::star::io::NotConnectedException);
+
+ /**
+ Connect to a mail service. Only one connection to a mail service
+ can be established at a time.
+
+ @param xConnectionContext
+ [in] an interface used to query for connection related information.
+ The context must contain the following values:
+ "ServerName" of type 'string', "Port" of type 'long', "ConnectionType"
+ of type 'string'. A list of supported connection types can be queried
+ using <code>getSupportedConnectionTypes</code>.
+
+ @param xAuthenticator
+ [in] an interface used to query for the necessary user information
+ needed to login to the mail server. If no authentication is required
+ the xAuthenticator must return an empty user name and an empty password.
+
+ @throws com::sun::star::lang::IllegalArgumentException
+ if the provided connection context contains invalid values or
+ misses required connection parameters.
+
+ @throws com::sun::star::io::AlreadyConnectedException
+ on a try to connect to an already connect mail server.
+
+ @throws com::sun::star::io::UnknownHostException
+ usually if the IP address of the mail server could not be
+ determined. Possible causes are a broken network connection,
+ a wrong server name, an unreachable DNS server, etc.
+
+ @throws com::sun::star::io::NoRouteToHostException
+ if an error occured to connect to the remote mail server.
+ Typically the remote mail server cannot be reach because of an
+ intervening firewall, or if an intermediate router is down,
+ the network connection is broken, etc.
+
+ @throws com::sun::star::io::ConnectException
+ if an error occured while attempting to connect to the remote
+ mail server. Typically the connection was refused remotely,
+ because the mail server is not listening on the remote address/port.
+
+ @throws com::sun::star::auth::AuthenticationException
+ if the specified user could not be logged in.
+
+ @throws com::sun::star::mail::MailException
+ for other errors during login.
+
+ @see com::sun::star::uno::XCurrentContext
+ @see com::sun::star::mail::XAuthenticator
+ @see com::sun::star::lang::IllegalArgumentException
+ @see com::sun::star::io::AlreadyConnectedException
+ @see com::sun::star::io::UnknownHostException
+ @see com::sun::star::io::NoRouteToHostException
+ @see com::sun::star::io::ConnectException
+ @see com::sun::star::auth::AuthenticationException
+ @see com::sun::star::mail::IllegalStateException
+ @see com::sun::star::mail::MailException
+ */
+ void connect([in] com::sun::star::uno::XCurrentContext xConnectionContext, [in] XAuthenticator xAuthenticator)
+ raises(com::sun::star::lang::IllegalArgumentException,
+ com::sun::star::io::AlreadyConnectedException,
+ com::sun::star::io::UnknownHostException,
+ com::sun::star::io::NoRouteToHostException,
+ com::sun::star::io::ConnectException,
+ com::sun::star::auth::AuthenticationFailedException,
+ com::sun::star::mail::MailException);
+
+ /**
+ Disconnect from a mail service.
+
+ @throws com::sun::star::mail::MailException
+ if errors occur during disconnecting.
+ */
+ void disconnect()
+ raises(com::sun::star::mail::MailException);
+
+ /**
+ Returns whether a connection to a mail service
+ currently exist or not.
+
+ @returns
+ <TRUE/> if a connection to a mail service is established.
+ */
+ boolean isConnected();
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/XMailServiceProvider.idl b/offapi/com/sun/star/mail/XMailServiceProvider.idl
new file mode 100644
index 000000000000..5f389a57ee58
--- /dev/null
+++ b/offapi/com/sun/star/mail/XMailServiceProvider.idl
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_XMailServiceProvider_idl__
+#define __com_sun_star_mail_XMailServiceProvider_idl__
+
+#ifndef __com_sun_star_mail_XMailService_idl__
+#include <com/sun/star/mail/XMailService.idl>
+#endif
+
+#ifndef __com_sun_star_mail_NoMailServiceProviderException_idl__
+#include <com/sun/star/mail/NoMailServiceProviderException.idl>
+#endif
+
+#ifndef __com_sun_star_mail_MailServiceType_idl__
+#include <com/sun/star/mail/MailServiceType.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+/**
+ A factory for creating different mail services.
+
+ @since OOo 2.0.0
+ */
+interface XMailServiceProvider: ::com::sun::star::uno::XInterface {
+
+ /**
+ A factory method.
+
+ @param aType
+ [in] the type of the requested mail service.
+
+ @returns
+ A XMailService interface.
+
+ @see com::sun::star::mail::XMailServiceProvider
+ @see com::sun::star::mail::MailServiceType
+ */
+ XMailService create([in] MailServiceType aType)
+ raises(com::sun::star::mail::NoMailServiceProviderException, com::sun::star::uno::Exception);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/XSmtpService.idl b/offapi/com/sun/star/mail/XSmtpService.idl
new file mode 100644
index 000000000000..278e9ebe85f1
--- /dev/null
+++ b/offapi/com/sun/star/mail/XSmtpService.idl
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_mail_XSmtpService_idl__
+#define __com_sun_star_mail_XSmtpService_idl__
+
+#ifndef __com_sun_star_mail_XMailService_idl__
+#include <com/sun/star/mail/XMailService.idl>
+#endif
+
+#ifndef __com_sun_star_mail_XMailMessage_idl__
+#include <com/sun/star/mail/XMailMessage.idl>
+#endif
+
+#ifndef __com_sun_star_io_NotConnectedException_idl__
+#include <com/sun/star/io/NotConnectedException.idl>
+#endif
+
+#ifndef __com_sun_star_io_ConnectException_idl__
+#include <com/sun/star/io/ConnectException.idl>
+#endif
+
+#ifndef __com_sun_star_mail_MailException_idl__
+#include <com/sun/star/mail/MailException.idl>
+#endif
+
+#ifndef __com_sun_star_mail_SendMailMessageFailedException_idl__
+#include <com/sun/star/mail/SendMailMessageFailedException.idl>
+#endif
+
+#ifndef __com_sun_star_datatransfer_UnsupportedFlavorException_idl__
+#include <com/sun/star/datatransfer/UnsupportedFlavorException.idl>
+#endif
+
+module com { module sun { module star { module mail {
+
+/**
+ Represents a SMTP service abstraction.
+
+ @see com::sun::star::mail::XMailService
+ @see com::sun::star::mail::XMailMessage
+
+ @since OOo 2.0.0
+ */
+interface XSmtpService: ::com::sun::star::mail::XMailService {
+
+ /**
+ Send a mail message to its recipients.
+
+ @param xMailMessage
+ [in] the mail message to be sent.
+
+ @throws com::sun::star::io::NotConnectedException
+ if no user is currently connected to the mail server.
+
+ @throws com::sun::star::mail::SendMailMessageFailedException
+ if the message could not be sent because of invalid recipient
+ addresses. The e-mail addresses of recipients have to conform to
+ <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>.
+
+ @throws com::sun::star::mail::MailException
+ is thrown on other errors that may happen during sending.
+ A possible reason may be for instance that a file attachment
+ specified in a mail message could not be found or accessed.
+
+ @throws com::sun::star::datatransfer::UnsupportedFlavorException
+ is thrown when the body of the mail message is provided in an
+ unsupported mime content type or may be thrown if one of the file
+ attachments specifies an unspupported mime content type.
+
+ @see com::sun::star::mail::XMailMessage
+ @see com::sun::star::io::NotConnectedException
+ @see com::sun::star::mail::SendMailMessageFailedException
+ @see com::sun::star::mail::MailException
+ @see com::sun::star::datatransfer::UnsupportedFlavorException
+ */
+ void sendMailMessage([in] XMailMessage xMailMessage)
+ raises(com::sun::star::io::NotConnectedException, com::sun::star::mail::SendMailMessageFailedException, com::sun::star::mail::MailException, com::sun::star::datatransfer::UnsupportedFlavorException);
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/mail/makefile.mk b/offapi/com/sun/star/mail/makefile.mk
new file mode 100644
index 000000000000..4b6854220b24
--- /dev/null
+++ b/offapi/com/sun/star/mail/makefile.mk
@@ -0,0 +1,58 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org 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 Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..$/..$/..
+
+PRJNAME=offapi
+
+TARGET=cssmail
+PACKAGE=com$/sun$/star$/mail
+
+# --- Settings -----------------------------------------------------
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# ------------------------------------------------------------------------
+
+IDLFILES=\
+ MailException.idl\
+ SendMailMessageFailedException.idl\
+ NoMailServiceProviderException.idl\
+ XMailService.idl\
+ XAuthenticator.idl\
+ XMailMessage.idl\
+ MailMessage.idl\
+ XConnectionListener.idl\
+ MailAttachment.idl\
+ XSmtpService.idl\
+ MailServiceType.idl\
+ XMailServiceProvider.idl\
+ MailServiceProvider.idl
+
+# ------------------------------------------------------------------
+
+.INCLUDE : target.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk