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_XMailMessage_idl__
25#define __com_sun_star_mail_XMailMessage_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30
31#ifndef __com_sun_star_mail_MailAttachment_idl__
32#include <com/sun/star/mail/MailAttachment.idl>
33#endif
34
35#ifndef __com_sun_star_datatransfer_XTransferable_idl__
36#include <com/sun/star/datatransfer/XTransferable.idl>
37#endif
38
39module com { module sun { module star { module mail {
40
41/**
42   Represents a mail message.
43
44   @see com::sun::star::mail::XMailServer
45
46   @since OpenOffice 2.0
47 */
48interface XMailMessage: ::com::sun::star::uno::XInterface {
49
50     /**
51        The display name of the sender of this mail message.
52    */
53    [attribute, readonly] string SenderName;
54    /**
55        The e-mail address of the sender of this mail message.
56        The e-mail address has to conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>.
57    */
58    [attribute, readonly] string SenderAddress;
59
60    /**
61        The e-mail address where replies on this mail message should be sent to.
62        If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>
63        sending the mail message later will fail.
64        If no ReplyToAddress is set replies go to the SenderAddress.
65    */
66    [attribute] string ReplyToAddress;
67
68    /**
69        Add an recipients e-mail address to the list of recipients of this mail message.
70        If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>
71        sending the mail message will fail.
72
73        @param sRecipientAddress
74        [in] the e-mail address of the recipient.
75    */
76    void addRecipient([in] string sRecipientAddress);
77
78    /**
79        Add an Cc recipients e-mail address to the list of recipients of this mail message.
80        If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>
81        sending the mail message will fail.
82
83        @param sRecipientAddress
84        [in] the e-mail address of the Cc recipient.
85    */
86    void addCcRecipient([in] string sRecipientAddress);
87
88    /**
89        Add an Bcc recipients e-mail address to the list of recipients of this mail message.
90        If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>
91        sending the mail message will fail.
92
93        @param sRecipientAddress
94        [in] the e-mail address of the Bcc recipient.
95    */
96    void addBccRecipient([in] string sRecipientAddress);
97
98    /**
99        Return a sequence of the e-mail addresses of all recipients of
100        this mail message.
101    */
102    sequence<string> getRecipients();
103
104    /**
105        Return a sequence of the e-mail addresses of all the Cc recipients
106        of this mail message.
107    */
108    sequence<string> getCcRecipients();
109
110    /**
111        Return a sequence of the e-mail addresses of all the Bcc recipients
112        of this mail message.
113    */
114    sequence<string> getBccRecipients();
115
116    /**
117        The subject of a mail message.
118    */
119    [attribute] string Subject;
120
121    /**
122        The body of the mail message.
123        It is expected that the transferable delivers the data as
124        a string. Although a transferable may support multiple
125        data flavors only the first data flavor supplied will be
126        used to retrieve the data and it is expected that the data
127        will be provided as a string.
128
129        @see com::sun::star::datatransfer::XTransferable
130    */
131    [attribute] com::sun::star::datatransfer::XTransferable Body;
132
133    /**
134        Add a file attachment to a mail message.
135
136        param aMailAttachment
137        [in] specifies a file which should be attached to this mail message.
138
139        @see com::sun::star::mail::MailAttachment
140    */
141    void addAttachment([in] MailAttachment aMailAttachment);
142
143    /**
144        Return a sequence of <type>MailAttachment</type>'s that will
145        be attached to this mail message.
146
147        @see com::sun::star::mail::MailAttachment
148    */
149    sequence<MailAttachment> getAttachments();
150};
151
152}; }; }; };
153
154#endif
155