-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
37 lines (26 loc) · 1009 Bytes
/
README.txt
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
# simple mail queue plugin #
The simpleMailQueuePlugin is a symfony plugin that provides a simple model to
which save mails to be sent by the application.
It also provides tasks that process the mail_queue table.
It requires the Zend_Mail class and works for symfony 1.2.
To configure the plugin you need this on your app.yml file:
all:
zend_lib_dir: /usr/share/php5/zf-lib-1.7
smtp:
ssl: tls
port: 587
auth: login
server: smtp.gmail.com
username: [email protected]
password: secret
To add mails to the mail_queue you use the MailQueue model:
$mail = new MailQueue();
$mail->setSubject('Title for the mail');
$mail->setBody('Body for the mail');
$mail->addTo('[email protected]');
$mail->addTo('[email protected]');
$mail->save();
To send the emails you can execute the following command:
php symfony mail:send-mails 100
This task needs to be run periodically so your emails get sent, so add it to
your cron.