README.md 3.13 KB
Newer Older
Roman Mátyus's avatar
Roman Mátyus committed
1
#FileMailer
Roman Mátyus's avatar
Roman Mátyus committed
2

Roman Mátyus's avatar
v0.2    
Roman Mátyus committed
3
Addon for catching e-mails in Nette FW to filesystem and showing it in the Debug Bar.
Roman Mátyus's avatar
Roman Mátyus committed
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

```
After configuring this addon is e-mails not sended, but ONLY stored to filesystem and showed in Debug Bar!
```

![Demo](http://i40.tinypic.com/oh91dd.png)

##Killer features

- Simple instalation
- Extensive configuration options
- Full access to header
- Show plain text and HTML output
- Possibility download the attachments
- Parser caching

##Instalation

Addon has two parts. First is `FileMailer` replaced the standard [Nette](http://nette.org) mailer and provides storing e-mails to filesystem. Second is `MailPanel` - extension of the Debug Bar provides graphical output of stored e-mails.

###Download

####Composer

Add package to your `composer.json`:

```
"rm/filemailer": "dev-master"
```

####Direct download

Download addon from [GitHub](https://github.com/romanmatyus/FileMailer) and unpack it in place where is indexed some RobotLoader.

###Configuring

####Simple

Mails is stored to `/temp/mails` and showed in Debug Bar.


```
nette:
	debugger:
		bar:
			- RM\MailPanel
services:
	nette.mailer:
		class: RM\FileMailer
		setup:
			- $tempDir(%appDir%/../temp/mails)
```

####Advanced

As new message count only e-mails newer then `5 seconds`, automatic remove e-mails older then `1 minutes`, in tab show `Subject, From, To, Bc, Bcc` and not automatic hiding panel where should be showed no messages.


```
nette:
  debugger:
		bar:
			- @mailPanel
services:
	nette.mailer:
		class: RM\FileMailer
		setup:
			- $tempDir(%appDir%/../temp/mails)
	mailPanel:
		class: RM\MailPanel
		setup:
			- $newMessageTime(-5 seconds)
			- $autoremove(-1 minutes)
			- $show( [subject,from,to,bc,bcc] )
			- $hideEmpty(FALSE)
```

##Options

Options for addon customization.

###`FileMailer`

| Name          |  Type  | Default value | Must be set |               Note                 |
| ------------- |:------:|:-------------:| :----------:| ---------------------------------- |
| $tempDir      | string |       -       |      yes    | Path to temporary files of e-mails |

###`MailPanel`

| Name            | Type        | Default value                    | Must be set | Note                                                             |
| --------------- | ----------- | ---------------------------------| :----------:| ---------------------------------------------------------------- |
| $newMessageTime | string      | `-10 seconds`                    | no          | By this time limit is defined new messages.                      |    
| $show           | array       | `array("subject", "from", "to")` | no          | Array of default displayed headers.                               |
| $autoremove     | bool/string | `FALSE`                          | no          | Define limit for automatic remove old e-mails. E.g. `-2 minutes` |
Roman Mátyus's avatar
v0.2    
Roman Mátyus committed
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
| $hideEmpty      | bool        | `TRUE`                           | no          | Hide empty panel?                                                |

##Changelog

###Version 0.2

- Add support of e-mail attachments
- Sort e-mails by date
- HTML e-mails showed into iframe
- Refactoring
- Fix copyright
- Many bug fixes

###Version 0.1

- Initial commit