1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 *
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
9 *
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
14 *
15 * The Original Code is mozilla.org code.
16 *
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
21 *
22 * Contributor(s):
23 * Eric Ballet Baz BT Global Services / Etat francais Ministere de la Defense
24 *
25 * Alternatively, the contents of this file may be used under the terms of
26 * either of the GNU General Public License Version 2 or later (the "GPL"),
27 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
36 *
37 * ***** END LICENSE BLOCK ***** */
38
39 #include "nsISupports.idl"
40 #include "nsIMsgComposeParams.idl"
41
42 interface nsIMsgIdentity;
43 interface nsIPrompt;
44 interface nsIAuthPrompt;
45 interface nsISmtpServer;
46 interface nsIInterfaceRequestor;
47 interface nsIFile;
48
49 [scriptable, uuid(b167bf57-51c0-41ae-b331-bd7025c01a20)]
50 interface nsISmtpUrl : nsISupports {
51 /**
52 * SMTP Parse specific getters.
53 * These retrieve various parts from the url.
54 */
55
56 /**
57 * This list is a list of all recipients to send the email to.
58 * Each name is NULL terminated.
59 */
60 attribute string recipients;
61
62 attribute boolean PostMessage;
63
64 /**
65 * The message can be stored in a file, to allow accessors for getting and
66 * setting the file name to post.
67 */
68 attribute nsIFile postMessageFile;
69
70 attribute boolean requestDSN;
71
72 /**
73 * SMTP Url instance specific getters and setters
74 * Information the protocol needs to know in order to run the url.
75 * These are NOT event sinks which are things the caller needs to know.
76 */
77
78 /**
79 * By default the url is really a bring up the compose window mailto url.
80 * You need to call this function if you want to force the message to be
81 * posted to the mailserver.
82 */
83
84 /**
85 * The user's full name and user's email address are encapsulated in the
86 * senderIdentity.
87 * (the user's domain name can be glopped from the user's email address)
88 *
89 * NOTE: the SMTP username and SMTP server are in the smtp url
90 * smtp://sspitzer@tintin/...
91 */
92 attribute nsIMsgIdentity senderIdentity;
93 attribute nsIPrompt prompt;
94 attribute nsIAuthPrompt authPrompt;
95 attribute nsIInterfaceRequestor notificationCallbacks;
96 attribute nsISmtpServer smtpServer;
97
98 const PRInt32 DEFAULT_SMTP_PORT = 25;
99 const PRInt32 DEFAULT_SMTPS_PORT = 465;
100 };
101
102 [scriptable, uuid(5EE2AFF7-9C6F-11d3-98A3-001083010E9B)]
103 interface nsIMailtoUrl : nsISupports {
104 /**
105 * mailto: parse specific getters
106 *
107 * All of these fields are things we can effectively extract from a
108 * mailto url if it contains all of these values
109 *
110 * Note: Attachments aren't available because that would expose a potential
111 * security hole (see bug 99055).
112 *
113 * These items are in one function as we only ever get them from the one
114 * place and all at the same time.
115 */
116 void GetMessageContents(out ACString aToPart, out ACString aCcPart,
117 out ACString aBccPart, out ACString aSubjectPart,
118 out ACString aBodyPart, out ACString aHtmlPart,
119 out ACString aReferencePart,
120 out ACString aNewsgroupPart,
121 out MSG_ComposeFormat aFormat);
122
123 /**
124 * These attributes are available should mailnews or extensions want them
125 * but aren't used by standard in mailnews.
126 */
127 readonly attribute ACString fromPart;
128 readonly attribute ACString followUpToPart;
129 readonly attribute ACString organizationPart;
130 readonly attribute ACString replyToPart;
131 readonly attribute ACString priorityPart;
132 readonly attribute ACString newsHostPart;
133 };