1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_mail_XSmtpService_idl__
25#define __com_sun_star_mail_XSmtpService_idl__
26
27#ifndef __com_sun_star_mail_XMailService_idl__
28#include <com/sun/star/mail/XMailService.idl>
29#endif
30
31#ifndef __com_sun_star_mail_XMailMessage_idl__
32#include <com/sun/star/mail/XMailMessage.idl>
33#endif
34
35#ifndef __com_sun_star_io_NotConnectedException_idl__
36#include <com/sun/star/io/NotConnectedException.idl>
37#endif
38
39#ifndef __com_sun_star_io_ConnectException_idl__
40#include <com/sun/star/io/ConnectException.idl>
41#endif
42
43#ifndef __com_sun_star_mail_MailException_idl__
44#include <com/sun/star/mail/MailException.idl>
45#endif
46
47#ifndef __com_sun_star_mail_SendMailMessageFailedException_idl__
48#include <com/sun/star/mail/SendMailMessageFailedException.idl>
49#endif
50
51#ifndef __com_sun_star_datatransfer_UnsupportedFlavorException_idl__
52#include <com/sun/star/datatransfer/UnsupportedFlavorException.idl>
53#endif
54
55module com { module sun { module star { module mail {
56
57/**
58   Represents a SMTP service abstraction.
59
60   @see com::sun::star::mail::XMailService
61   @see com::sun::star::mail::XMailMessage
62
63   @since OpenOffice 2.0
64 */
65interface XSmtpService: ::com::sun::star::mail::XMailService {
66
67    /**
68        Send a mail message to its recipients.
69
70        @param xMailMessage
71        [in] the mail message to be sent.
72
73        @throws com::sun::star::io::NotConnectedException
74        if no user is currently connected to the mail server.
75
76        @throws com::sun::star::mail::SendMailMessageFailedException
77        if the message could not be sent because of invalid recipient
78        addresses. The e-mail addresses of recipients have to conform to
79        <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>.
80
81        @throws com::sun::star::mail::MailException
82        is thrown on other errors that may happen during sending.
83        A possible reason may be for instance that a file attachment
84        specified in a mail message could not be found or accessed.
85
86        @throws com::sun::star::datatransfer::UnsupportedFlavorException
87        is thrown when the body of the mail message is provided in an
88        unsupported mime content type or may be thrown if one of the file
89        attachments specifies an unspupported mime content type.
90
91        @see com::sun::star::mail::XMailMessage
92        @see com::sun::star::io::NotConnectedException
93        @see com::sun::star::mail::SendMailMessageFailedException
94        @see com::sun::star::mail::MailException
95        @see com::sun::star::datatransfer::UnsupportedFlavorException
96    */
97    void sendMailMessage([in] XMailMessage xMailMessage)
98        raises(com::sun::star::io::NotConnectedException, com::sun::star::mail::SendMailMessageFailedException, com::sun::star::mail::MailException, com::sun::star::datatransfer::UnsupportedFlavorException);
99};
100
101}; }; }; };
102
103#endif
104