summaryrefslogtreecommitdiffstats
path: root/offapi/com/sun/star/mail
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
commit267c6f2ac71f92999e969232431ba04678e7437e (patch)
tree358c9467650e1d0a1d7227a21dac2e3d08b622b2 /offapi/com/sun/star/mail
parentInitial commit. (diff)
downloadlibreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz
libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'offapi/com/sun/star/mail')
-rw-r--r--offapi/com/sun/star/mail/MailAttachment.idl52
-rw-r--r--offapi/com/sun/star/mail/MailException.idl34
-rw-r--r--offapi/com/sun/star/mail/MailMessage.idl88
-rw-r--r--offapi/com/sun/star/mail/MailServiceProvider.idl37
-rw-r--r--offapi/com/sun/star/mail/MailServiceType.idl39
-rw-r--r--offapi/com/sun/star/mail/NoMailServiceProviderException.idl37
-rw-r--r--offapi/com/sun/star/mail/NoMailTransportProviderException.idl37
-rw-r--r--offapi/com/sun/star/mail/SendMailMessageFailedException.idl53
-rw-r--r--offapi/com/sun/star/mail/XAuthenticator.idl51
-rw-r--r--offapi/com/sun/star/mail/XConnectionListener.idl54
-rw-r--r--offapi/com/sun/star/mail/XMailMessage.idl135
-rw-r--r--offapi/com/sun/star/mail/XMailService.idl185
-rw-r--r--offapi/com/sun/star/mail/XMailServiceProvider.idl47
-rw-r--r--offapi/com/sun/star/mail/XSmtpService.idl68
14 files changed, 917 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 0000000000..6d58e7a625
--- /dev/null
+++ b/offapi/com/sun/star/mail/MailAttachment.idl
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module com { module sun { module star { module mail {
+
+/**
+ A MailAttachment specifies a mail message attachment.
+
+ @see ::com::sun::star::mail::XMailMessage
+
+ @since OOo 2.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 retrieve 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;
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/MailException.idl b/offapi/com/sun/star/mail/MailException.idl
new file mode 100644
index 0000000000..79677168bf
--- /dev/null
+++ b/offapi/com/sun/star/mail/MailException.idl
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module com { module sun { module star { module mail {
+
+/**
+ An MailException is the base of all mail related
+ exceptions.
+
+ @since OOo 2.0
+ */
+exception MailException: com::sun::star::uno::Exception
+{
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/MailMessage.idl b/offapi/com/sun/star/mail/MailMessage.idl
new file mode 100644
index 0000000000..79d87adc7e
--- /dev/null
+++ b/offapi/com/sun/star/mail/MailMessage.idl
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module com { module sun { module star { module mail {
+
+interface XMailMessage;
+
+/**
+ @since OOo 2.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);
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/MailServiceProvider.idl b/offapi/com/sun/star/mail/MailServiceProvider.idl
new file mode 100644
index 0000000000..9c9026c43e
--- /dev/null
+++ b/offapi/com/sun/star/mail/MailServiceProvider.idl
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module com { module sun { module star { module mail {
+
+/**
+ @since OOo 2.0
+ */
+service MailServiceProvider: XMailServiceProvider
+{
+ /**
+ Creation method.
+
+ @see com::sun::star::mail::XMailServiceProvider
+ */
+ create();
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/MailServiceType.idl b/offapi/com/sun/star/mail/MailServiceType.idl
new file mode 100644
index 0000000000..8a27c2edec
--- /dev/null
+++ b/offapi/com/sun/star/mail/MailServiceType.idl
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module com { module sun { module star { module mail {
+
+/**
+ @since OOo 2.0
+ */
+enum MailServiceType
+{
+ /** A SMTP service */
+ SMTP,
+
+ /** A POP3 service */
+ POP3,
+
+ /** A IMAP service */
+ IMAP
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/NoMailServiceProviderException.idl b/offapi/com/sun/star/mail/NoMailServiceProviderException.idl
new file mode 100644
index 0000000000..1dd21c084c
--- /dev/null
+++ b/offapi/com/sun/star/mail/NoMailServiceProviderException.idl
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module com { module sun { module star { module mail {
+
+/**
+ A NoMailServiceProviderException 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
+ */
+exception NoMailServiceProviderException: com::sun::star::mail::MailException
+{
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/NoMailTransportProviderException.idl b/offapi/com/sun/star/mail/NoMailTransportProviderException.idl
new file mode 100644
index 0000000000..00d596a553
--- /dev/null
+++ b/offapi/com/sun/star/mail/NoMailTransportProviderException.idl
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module com { module sun { module star { module mail {
+
+/**
+ A NoMailTransportProviderException 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
+ */
+exception NoMailTransportProviderException: com::sun::star::mail::MailException
+{
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/SendMailMessageFailedException.idl b/offapi/com/sun/star/mail/SendMailMessageFailedException.idl
new file mode 100644
index 0000000000..da97eb29b0
--- /dev/null
+++ b/offapi/com/sun/star/mail/SendMailMessageFailedException.idl
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+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::XMailService
+
+ @since OOo 2.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;
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/XAuthenticator.idl b/offapi/com/sun/star/mail/XAuthenticator.idl
new file mode 100644
index 0000000000..5450287fc0
--- /dev/null
+++ b/offapi/com/sun/star/mail/XAuthenticator.idl
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+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
+ */
+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();
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/XConnectionListener.idl b/offapi/com/sun/star/mail/XConnectionListener.idl
new file mode 100644
index 0000000000..be9d2bbe72
--- /dev/null
+++ b/offapi/com/sun/star/mail/XConnectionListener.idl
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module com { module sun { module star { module mail {
+
+/**
+ The listener interface for connection events.
+
+ @see com::sun::star::mail::XMailService
+
+ @since OOo 2.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);
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/XMailMessage.idl b/offapi/com/sun/star/mail/XMailMessage.idl
new file mode 100644
index 0000000000..ad0411e0bd
--- /dev/null
+++ b/offapi/com/sun/star/mail/XMailMessage.idl
@@ -0,0 +1,135 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module com { module sun { module star { module mail {
+
+/**
+ Represents a mail message.
+
+ @see com::sun::star::mail::XMailService
+
+ @since OOo 2.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 a 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 a 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 a 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 MailAttachment's that will
+ be attached to this mail message.
+
+ @see com::sun::star::mail::MailAttachment
+ */
+ sequence<MailAttachment> getAttachments();
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/XMailService.idl b/offapi/com/sun/star/mail/XMailService.idl
new file mode 100644
index 0000000000..a09984b1f0
--- /dev/null
+++ b/offapi/com/sun/star/mail/XMailService.idl
@@ -0,0 +1,185 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+module com { module sun { module star { module mail {
+
+/**
+ Represents a mail server abstraction.
+
+ @since OOo 2.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 connection. The context
+ contains information like the server name, port, connection type
+ etc.
+
+ @pre
+ <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:
+ <ul>
+ <li>
+ <b>ServerName</b> of type 'string'.
+ </li>
+ <li>
+ <b>Port</b> of type 'long'.
+ </li>
+ <li>
+ <b>ConnectionType</b> of type 'string'.
+ A list of supported connection types can be queried using
+ getSupportedConnectionTypes().
+ </li>
+ <li>
+ <b>Timeout</b> of type 'long' (Optional).
+ Specifies a timeout in seconds for blocking operations,
+ like the connection attempt.
+ </li>
+ </ul>
+
+ @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 occurred 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 occurred 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();
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/XMailServiceProvider.idl b/offapi/com/sun/star/mail/XMailServiceProvider.idl
new file mode 100644
index 0000000000..fa4ea8dcb0
--- /dev/null
+++ b/offapi/com/sun/star/mail/XMailServiceProvider.idl
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+module com { module sun { module star { module mail {
+
+/**
+ A factory for creating different mail services.
+
+ @since OOo 2.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);
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/mail/XSmtpService.idl b/offapi/com/sun/star/mail/XSmtpService.idl
new file mode 100644
index 0000000000..007984a565
--- /dev/null
+++ b/offapi/com/sun/star/mail/XSmtpService.idl
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+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
+ */
+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 unsupported 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);
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */