1OPENCHANGECLIENT(1)        OpenChange Users' Manual        OPENCHANGECLIENT(1)
2
3
4

NAME

6       openchangeclient - MAPI command line messaging tool
7
8

SYNOPSIS

10       openchangeclient [-?SFmDV] [-?|--help] [--usage] [-f|--database STRING] [--pf]
11         [-p|--profile STRING] [-P|--password STRING] [-S|--sendmail] [--sendappointment]
12         [--sendcontact] [--sendtask] [--sendnote] [-F|--fetchmail] [-G|--storemail STRING]
13         [-i|--fetch-items STRING] [--freebusy=STRING] [--force] [--delete=STRING]
14         [-u|--update STRING] [-m|--mailbox] [-D|--deletemail] [-A|--attachments STRING]
15         [-I|--html-inline STRING] [-W|--html-file STRING] [-t|--to STRING] [-c|--cc STRING]
16         [-b|--bcc STRING] [-s|--subject STRING] [-B|--body STRING] [--location=STRING]
17         [--label=STRING] [--dtstart=STRING] [--dtend=STRING] [--busystatus=STRING]
18         [--taskstatus=STRING] [--importance=STRING] [--email=STRING] [--fullname=STRING]
19         [--cardname=STRING] [--color=STRING] [--notifications] [--folder=STRING] [--mkdir]
20         [--rmdir] [--userlist] [--folder-name=STRING] [--folder-comment=STRING]
21         [-d|--debuglevel STRING] [--dump-data] [--private] [--ocpf-file=STRING]
22         [--ocpf-dump=STRING] [--ocpf-syntax] [--ocpf-sender] [-V|--version]
23
24
25

DESCRIPTION

27       openchangeclient  is  a  MAPI  command line tool designed to facilitate
28       mail send, receive and delete operations using the  MAPI  protocol.  It
29       also provides operations on tasks, contacts (address book) and calendar
30       operations.
31
32

COMMANDS

34       --fetchmail
35
36       -F     Fetch Exchange user mails from the  inbox  and  display  general
37              information from the mails on the standard output.
38
39
40       --storemail=DIRECTORY
41
42       -G     Store  mail attachments to the local filesystem in the specified
43              directory. This is the normal way to retrieve attachments.
44
45
46       --fetch-items=STRING
47
48       -i     Retrieve specific items from Exchange default folders.  Possible
49              value for STRING are Mail, Appointment, Contact, Task, Note.
50
51
52       --mkdir
53              Create a folder within the mailbox or public folders store hier‐
54              archy. This command requires that the  --folder-name  option  be
55              used to specify the name of the folder to create.
56
57
58       --rmdir
59              Deletes  a  folder  within  the  mailbox or public folders store
60              hierarchy. This option requires that the --folder-name option be
61              used to specify the name of the folder to delete.
62
63
64       --mailbox
65
66       -m     Display  the  user  mailbox  folder hierarchy with folder names,
67              folder comments, the folder type, number of unread items in  the
68              folder and total number of items in the folder.
69
70
71       --notifications
72              Monitor  NEWMAIL  notifications  in the Inbox folder and display
73              summary on standard output.
74
75
76       --sendmail
77
78       -S     Send a mail to a user belonging to  the  Exchange  organization.
79              This  requires  specifying one or more recipients (see the --to,
80              --cc and --bcc options), a subject (see  the  --subject  option)
81              and  a  body  (see  the  --body,  --html-file  and --html-inline
82              options).
83
84
85       --sendappointment
86              Create an appointment in the default calendar folder.
87
88
89       --sendcontact
90              Create a contact in the default contact folder.
91
92
93       --sendtask
94              Create a task in the default task folder.
95
96
97       --sendnote
98              Create a note in the default notes folder.
99
100
101       --deletemail
102
103       -D     Delete a mail from the exchange user mailbox. This requires  use
104              of the --subject option to specify the mail to be deleted.
105
106
107       --userlist
108              Display the users listed in the address book.
109
110
111       --delete=STRING
112              Delete a specified item from the store by ID number.
113
114
115       --ocpf-dump=STRING
116              Download a message (specified by the argument, which must be the
117              folder ID and unique message ID for the message) as OCPF format.
118              The  message  will  be  saved to a file given by the message ID,
119              followed by a suffix of .ocpf
120
121              See the separate  (HTML)  documentation  for  libocpf  for  more
122              information on the OCPF format.
123
124
125       --ocpf-sender
126              Send a message given in OCPF format to the server. This requires
127              use of the --ocpf-file option to specify the file to load from.
128
129              See the separate  (HTML)  documentation  for  libocpf  for  more
130              information on the OCPF format.
131
132
133       --ocpf-syntax
134              Check the syntax of an OCPF file. This does not perform any net‐
135              work operations. This requires use of the --ocpf-file option  to
136              specify the file to load from.
137
138              See  the  separate  (HTML)  documentation  for  libocpf for more
139              information on the OCPF format.
140
141
142       --freebusy=STRING
143              Fetch the free / busy status  for  the  user  specified  by  the
144              string. You will usually need to use the --pf option (see below)
145              since free / busy status is normally obtained  from  the  public
146              folder store.
147
148

OPTIONS

150       --database=DATABASE
151
152       -f     Set the MAPI profile database. If no database is specified, then
153              openchangeclient tries to load  the  default  one:  $HOME/.open‐
154              change/profiles.ldb
155
156
157       --profile=PROFILE
158
159       -p     Set  the  profile to use. If a profile is not specified, and one
160              of the profiles has been set as the default in the profile data‐
161              base (for example, using mapiprofile -S), then that default pro‐
162              file will be used.
163
164
165       --password
166
167       -P     Specify the password for the profile to be  used.  This  can  be
168              omitted if the password is stored in the profile.
169
170
171       --pf   Perform operations against the Public Folders store, rather than
172              the normal operations against a user's private folders.
173
174
175       --folder
176              Specify the folder name we want to work with want to open.  This
177              option  is mandatory for public folders, but can also be used to
178              open specific folders in the mailbox store.
179
180
181       --attachments="ATTACHMENT1;ATTACHMENT2"
182
183       -A     Set attachments to send when sending a mail. Attached  filenames
184              need  to  be  separated  with  semi-colons  as  specified in the
185              description above. This is only meaningful with --sendmail
186
187
188       --subject=STRING
189
190       -s     Specify the mail subject. If no subject is specified,  the  mail
191              subject will be empty.  This is only meaningful with --sendmail
192
193
194       --body=STRING
195
196       -B     Set the body of the mail to be the UTF8 text only content speci‐
197              fied on the command line. This is only meaningful  with  --send‐
198              mail
199
200
201       --html-inline=STRING
202
203       -I     Set  the  body  of  the mail to be the HTML content specified on
204              command line. This is only meaningful with --sendmail
205
206
207       --html-file=FILENAME
208
209       -W     Set the body of the mail to be  the  content  of  the  specified
210              file. This is only meaningful with --sendmail
211
212
213       --to="USERNAME1,USERNAME2"
214
215       -t     Specify  To  recipients for the mail. Usernames need to be sepa‐
216              rated with commas as specified in the  example  above.  This  is
217              only meaningful with --sendmail
218
219
220       --cc="USERNAME1,USERNAME2"
221
222       -c     Specify  Cc  recipients for the mail. Usernames need to be sepa‐
223              rated with commas as specified in the  example  above.  This  is
224              only meaningful with --sendmail
225
226
227       --bcc="USERNAME1,USERNAME2"
228
229       -b     Specify  Bcc recipients for the mail. Usernames need to be sepa‐
230              rated with commas as specified in the  example  above.  This  is
231              only meaningful with --sendmail
232
233
234       --location=STRING
235              Specify  the  appointment location. This is only meaningful with
236              --sendappointment
237
238
239       --dtstart=STRING
240              Specify the start date of an event. The  following  date  format
241              needs  to  be  used: %Y-%m-%d %H:%M:%S e.g: 2007-06-01 14:59:00.
242              This is only meaningful with --sendappointment and --sendtask
243
244
245       --dtend=STRING
246              Specify either the end date or due date of an event. The follow‐
247              ing  date  format  needs  to  be  used:  %Y-%m-%d  %H:%M:%S e.g:
248              2007-06-01  14:59:00  When  no  dtend  parameter  is  specified,
249              default  value  is  set  to dtstart This is only meaningful with
250              --sendappointment and --sendtask
251
252
253       --force
254              Add appointment to the calendar, even if it would  overlap  with
255              an  existing appointment. This is only meaningful with --sendap‐
256              pointment
257
258
259       --private
260              Mark the appointment as private event. This is  only  meaningful
261              with --sendappointment
262
263
264       --busystatus=STRING
265              Set the busy status of an appointment. Possible values are FREE,
266              TENTATIVE, BUSY or OUTOFOFFICE. This  is  only  meaningful  with
267              --sendappointment
268
269
270       --label=STRING
271              Set  the  type  of appointment. Possible values are NONE, IMPOR‐
272              TANT,     BUSINESS,     PERSONAL,     VACATION,     MUST_ATTEND,
273              TRAVEL_REQUIRED,  NEEDS_PREPARATION,  BIRTHDAY,  ANNIVERSARY and
274              PHONE_CALL.  This is only meaningful with --sendappointment
275
276
277       --taskstatus=STRING
278              Set the status  of  a  task.  Possible  values  are  NOTSTARTED,
279              PROGRESS,  COMPLETED, WAITING, DEFERRED. This is only meaningful
280              with --sendtask
281
282
283       --fullname=STRING
284              Set the full name in a contact message. This is only  meaningful
285              with --sendcontact
286
287
288       --cardname=STRING
289              Set  the  card  name  of a task or contact message. This is only
290              meaningful with --sendcontact or --sendtask
291
292
293       --email=STRING
294              Set the email address in a contact message. This is  only  mean‐
295              ingful with --sendcontact
296
297
298       --importance=STRING
299              Set  the relative importance of a task. Possible values are LOW,
300              NORMAL and HIGH. This is only meaningful with --sendtask
301
302
303       --color=STRING
304              Set the color of the note. The default color  is  Yellow.  Other
305              options are Blue, Green, Pink and White. This is only meaningful
306              with --sendnote
307
308
309       --folder-name=STRING
310              Set the folder name to create.  This  is  only  meaningful  with
311              --mkdir or --rmdir
312
313
314       --folder-comment=STRING
315              Set the folder comment. This is only meaningful with --mkdir
316
317
318       --update=STRING
319
320       -u     Change  (update)  an  existing  item, rather than creating a new
321              one. This is only meaningful  with  --sendtask  ,  --sendnote  ,
322              --sendappointment and --sendcontact
323
324
325       --ocpf-file=STRING
326              Specify the file to load OCPF data from. This is only meaningful
327              with --ocpf-sender and --ocpf-syntax
328
329
330       --dump-data
331              Display raw format data associated with the operation. You  nor‐
332              mally only need this when debugging.
333
334
335       --debug-level=LEVEL
336              Display   debugging  information  at  the  specified  level  (or
337              higher). Level 10 is a lot of debug information.
338
339
340

EXAMPLES

342       Fetching emails:
343       openchangeclient --database=/tmp/profiles.ldb --profile=2000 --fetchmail
344
345       Fetch emails and store attachments:
346       openchangeclient --database=/tmp/profiles.ldb --profile=2000 --fetchmail --storemail=test
347
348       All attachments from any mails will be stored in the test directory. If
349       the  specified  directory does not exist, it will automatically be cre‐
350       ated. Note that if the  attachment  name  is  not  unique  amongst  all
351       emails, some attachments may be overwritten.
352
353
354       Send a basic email:
355       openchangeclient --database=/tmp/profiles.ldb --profile=2000
356                        --to="Adm,jker" --cc=Paul --bcc=Bill
357                        --subject="It is working"
358                        --body="This is a sample body" --sendmail
359
360       A  mail  with  UTF8 (text only) content will be sent with the following
361       recipients:
362
363       to = Administrator and jkerihuel
364
365       cc = Paul
366
367       bcc = Bill
368
369
370       Send an inline HTML email:
371       openchangeclient --database=/tmp/profiles.ldb --profile=2000
372                        --to=Adm --subject="Inline HTML sample email"
373                        --html-inline="<body bgcolor=yellow><h1>My first HTML email</h1></body>"
374                        --sendmail
375
376       Administrator will receive a mail with HTML body  -  yellow  background
377       and a title.
378
379
380       Send a HTML mail using a file:
381       openchangeclient --database=/tmp/profiles.ldb --profile=2000
382                        --to=Adm --subject="HTML file email"
383                        --html-file=/tmp/myfile.html
384                        --sendmail
385
386       The  content of /tmp/myfile.html will be used to fill the HTML body. If
387       the HTML file exceed a fixed size (0x4000 bytes), then PR_HTML  content
388       will be sent using MAPI streams.
389
390
391       Send email with attachments:
392       openchangeclient --database=/tmp/profiles.ldb --profile=2000
393                        --to=Adm --subject="Attachments"
394                        --attachments="/tmp/file1.jpg;/tmp/file2.jpg;tmp/file2.jpg"
395                        --body="These are sample attachments"
396                        --sendmail
397
398       The  example  above  will  send  a  UTF8 body mail to Administrator and
399       attach file1,jpg, file2.jpg and file3.jpg to the email.
400
401       Display the users in the address book
402       openchangeclient --userlist
403
404       Fetch calendar items:
405       openchangeclient --fetch-items=Appointment
406
407
408       Fetch contact items:
409       openchangeclient --fetch-items=Contact
410
411
412       Fetch task items:
413       openchangeclient --fetch-items=Task
414
415
416       Create appointment:
417       openchangeclient --sendappointment --dtstart="2007-06-01 22:00:00" \
418                        --dtend="2007-06-01 22:35:00"                     \
419                        --busystatus=FREE                                 \
420                        --location="Home"                                 \
421                        --subject="Check the Junk folder"
422
423
424       Create Task:
425       openchangeclient --sendtask --dtstart="2008-11-01 18:00:00"        \
426                        --cardname="openchangeclient" --importance=HIGH   \
427                        --taskstatus=COMPLETED --body="my new task"
428
429
430       Create contact:
431       openchangeclient --sendcontact --cardname="openchangeclient"       \
432                        --fullname="OpenChange Client 3rd"                \
433                        --email="openchangeclient@nonexistentdomain.com"
434
435       Create folder:
436       openchangeclient --mkdir --folder-name="openchange"            \
437                  --folder-comment="comment"
438
439       This example will create a generic folder named  openchange  under  the
440       Inbox folder.
441
442       Delete folder:
443       openchangeclient --rmdir --folder-name="openchange"
444
445       This  example  will  delete  the  generic folder named openchange under
446       Inbox folder.
447
448       List Mailbox hierarchy:
449       openchangeclient --mailbox
450
451       Obtain free / busy status
452       openchangeclient --pf --freebusy="test user3"
453
454

AUTHOR

456       Julien Kerihuel <j.kerihuel at openchange dot org>
457
458
459
460OpenChange libmapi 0.9            2009-12-17               OPENCHANGECLIENT(1)
Impressum