This commit was generated by cvs2svn to compensate for changes in r8690,
[freeside.git] / rt / docs / templates.pod
1 =head1 Templates
2
3 Each template is split into two sections. A block of headers and a body. These
4 sections are separated by a blank line.
5
6 =head2 Headers
7
8 Your template may specify arbitrary email headers. Each header is a name, a
9 colon, then a value. So, for example, to specify a subject, you can use:
10
11     Subject: Thanks for your bug report.
12
13 =head3 Special Headers
14
15 =over
16
17 =item Content-Type: text/html
18
19 The special header "Content-Type: text/html" tells RT that the template should
20 be parsed as HTML. RT will automatically make the outgoing message multipart.
21 That way, recipients who can read only plaintext email will receive something
22 readable, while users with clients which can display HTML will receive the full
23 experience. Please be aware that HTML support in mail clients varies greatly,
24 much more so than different web browsers.
25
26 We welcome contributions of HTML-ization of builtin templates.
27
28 =back
29
30 =head2 Variables
31
32 The variables that your templates may use include:
33
34 =over 4
35
36 =item C<$Transaction>
37
38 The transaction object.
39
40 =item C<$rtname>
41
42 The value of the "rtname" config variable.
43
44 =item C<$Ticket>
45
46 The ticket object. This is only set during a ticket transaction.
47
48 =item C<$Requestor>
49
50 This is not an object, but the name of the first requestor on the ticket.
51 If this is not what you need, inspect C<< $Ticket->Requestors >>.
52
53 =item C<loc("text")>
54
55 A localization function. See L<Locale::Maketext>.
56
57 =back
58
59 =cut
60