1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_mail_XMailMessage_idl__
29#define __com_sun_star_mail_XMailMessage_idl__
30
31#ifndef __com_sun_star_uno_XInterface_idl__
32#include <com/sun/star/uno/XInterface.idl>
33#endif
34
35#ifndef __com_sun_star_mail_MailAttachment_idl__
36#include <com/sun/star/mail/MailAttachment.idl>
37#endif
38
39#ifndef __com_sun_star_datatransfer_XTransferable_idl__
40#include <com/sun/star/datatransfer/XTransferable.idl>
41#endif
42
43module com { module sun { module star { module mail {
44
45/**
46   Represents a mail message.
47
48   @see com::sun::star::mail::XMailServer
49
50   @since OOo 2.0
51 */
52interface XMailMessage: ::com::sun::star::uno::XInterface {
53
54     /**
55        The display name of the sender of this mail message.
56    */
57    [attribute, readonly] string SenderName;
58    /**
59        The e-mail address of the sender of this mail message.
60        The e-mail address has to conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>.
61    */
62    [attribute, readonly] string SenderAddress;
63
64    /**
65        The e-mail address where replies on this mail message should be sent to.
66        If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>
67        sending the mail message later will fail.
68        If no ReplyToAddress is set replies go to the SenderAddress.
69    */
70    [attribute] string ReplyToAddress;
71
72    /**
73        Add an recipients e-mail address to the list of recipients of this mail message.
74        If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>
75        sending the mail message will fail.
76
77        @param sRecipientAddress
78        [in] the e-mail address of the recipient.
79    */
80    void addRecipient([in] string sRecipientAddress);
81
82    /**
83        Add an Cc recipients e-mail address to the list of recipients of this mail message.
84        If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>
85        sending the mail message will fail.
86
87        @param sRecipientAddress
88        [in] the e-mail address of the Cc recipient.
89    */
90    void addCcRecipient([in] string sRecipientAddress);
91
92    /**
93        Add an Bcc recipients e-mail address to the list of recipients of this mail message.
94        If the e-mail address doesn't conform to <a href="http://www.ietf.org/rfc/rfc822.txt">RFC&nbsp;822</a>
95        sending the mail message will fail.
96
97        @param sRecipientAddress
98        [in] the e-mail address of the Bcc recipient.
99    */
100    void addBccRecipient([in] string sRecipientAddress);
101
102    /**
103        Return a sequence of the e-mail addresses of all recipients of
104        this mail message.
105    */
106    sequence<string> getRecipients();
107
108    /**
109        Return a sequence of the e-mail addresses of all the Cc recipients
110        of this mail message.
111    */
112    sequence<string> getCcRecipients();
113
114    /**
115        Return a sequence of the e-mail addresses of all the Bcc recipients
116        of this mail message.
117    */
118    sequence<string> getBccRecipients();
119
120    /**
121        The subject of a mail message.
122    */
123    [attribute] string Subject;
124
125    /**
126        The body of the mail message.
127        It is expected that the transferable delivers the data as
128        a string. Although a transferable may support multiple
129        data flavors only the first data flavor supplied will be
130        used to retrieve the data and it is expected that the data
131        will be provided as a string.
132
133        @see com::sun::star::datatransfer::XTransferable
134    */
135    [attribute] com::sun::star::datatransfer::XTransferable Body;
136
137    /**
138        Add a file attachment to a mail message.
139
140        param aMailAttachment
141        [in] specifies a file which should be attached to this mail message.
142
143        @see com::sun::star::mail::MailAttachment
144    */
145    void addAttachment([in] MailAttachment aMailAttachment);
146
147    /**
148        Return a sequence of <type>MailAttachment</type>'s that will
149        be attached to this mail message.
150
151        @see com::sun::star::mail::MailAttachment
152    */
153    sequence<MailAttachment> getAttachments();
154};
155
156}; }; }; };
157
158#endif
159