-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
66 lines (42 loc) · 2.56 KB
/
README
1
2
3
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
The `sfEmailManagerPlugin` is an interface to http://emailmanager.com/ application. From their page:
> You have an app, you setup a local SMTP server and start firing emails at it. You don’t know if they are bouncing, making it to the Inbox or just failing altogether. Don’t worry, it’s not your fault. You should not have to worry about this stuff, it’s an entire industry on its own. With Emailmanager, we provide the peace of mind and insight to know your valuable messages are being received.
Prerequisites
-------------
This plugin for symfony 1.3/1.4, www.emailmanager.com requires registration on it's site and set up mail server.
More info at [http://emailmanager.com]
Installation
------------
1 - Install the plugin.
The easiest way to install `sfEmailManagerPlugin` is to use the symfony command line:
> php symfony plugin:install sfEmailManagerPlugin
However recommended method is to fork the latest package from my git hub [https://github.com/zdanozdan/sfEmailManagerPlugin] as I put changes there and may not have time to build symfony package.
With version 1.6.5 of git and later, you can use:
> git clone --recursive git@github.com:zdanozdan/sfEmailManagerPlugin.git
For older git versions, just use:
> git clone git@github.com:zdanozdan/sfEmailManagerPlugin.git
> git submodule update --init
Now navigate to lib/vendor and change submodule branch to master
> cd lib/vendor
> git checkout master
2 - Register on emailmanagerapp, create server, get api key and signatures
3 - Configure app.yml
> sf_emailmanager_plugin:
> key: API Key > should get it from emailmanager after registration
> from: foo@bar.com > your regisered mail address
> name: Foo Bar > your registered name
Those 3 are required to put in user app.yml config.
4 - Clear the cache to enable the autoloading to find the new classes:
> php symfony cc
5 - Start sending emails
> sfEmailManager::compose()
> ->addTo('address@example.com', 'Name')
> ->subject('Subject')
> ->messagePlain('Plaintext message')
> ->tag('Test tag')
> ->send();
sfEmailManager extending Mail_Emailmanager class which is official PHP class for Emailmanager (https://github.com/Znarkus/emailmanager-php) so all the code from Emailmanager documentation should be valid as well.
6. sfMailer factory
It is also possible to replace default symfony sfMailer based on Swift Mailer in factories.yml with sfEmailManager, it would become default mailer for Symfony, however I had not tried that.
TODO
----
* add some testing