You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-10Lines changed: 13 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -22,18 +22,22 @@ This is where solutions like Emailqueue come in handy: Emailqueue is not an SMTP
22
22
* Inject any number of emails super-fast and inmediately free your app to do other things. Let Emailqueue do the job in the background.
23
23
* Prioritize emails: Specify a priority when injecting an email and it will be sent before any other queued emails with lower priorities. E.g: You can inject 100k emails for a newsletter with priority 10 (they will take a while to be sent), and still inject an important email (like a password reminder message) with priority 1 to be sent ASAP even before the huge newsletter has been sent.
24
24
* Schedule emails: Inject now an email and specify a future date/time for a scheduled delivery.
25
-
* The code is quite naive, built in the early 2000s. But boy, it's been tested! This means it will be very easy for you if you decide to branch/fork it and improve it. Emailqueue is a funny grown man.
25
+
* The code is quite naive, built in the early 2000s. But boy, it's been tested! This means it will be very easy for you if you decide to branch/fork it and improve it. Emailqueue is a funny grown old man.
26
26
27
27
28
28
# Changelog #
29
+
***Version 3.3**
30
+
* Support for Emoji.
31
+
* Errors are now thrown using standard PHP Exceptions and are easily catchable.
32
+
29
33
***Version 3.2**
30
34
* Switched to MIT license, now Emailqueue can be used in commercial, non GNU-GPL projects.
31
35
* emailqueue_inject::inject method is now called differently, see the "How to use" section or example.php for for info.
32
36
* "is_send_now" emailqueue_inject::inject parameter sends the email without waiting for the next queue processing event, perfect for those cases where you can't even wait a minute to have your email delivered.
33
37
* Now uses composer for library dependencies.
34
38
* Using standard <?php instead of the shorthand <? version for improved compatibility.
35
39
* No need to configure LIB_DIR or APP_DIR anymore.
36
-
* "is_inmediate" parameter typo solve, now it's called "is_immediate"
40
+
* "is_inmediate" parameter typo solve876543 , now it's called "is_immediate"
37
41
38
42
***Version 3.1**
39
43
* Finally Emailqueue supports attachments! See the "Hints" section for an interesting idea with this.
@@ -49,6 +53,7 @@ This is where solutions like Emailqueue come in handy: Emailqueue is not an SMTP
49
53
* Recode the file logging system.
50
54
* Recode it to modern standards.
51
55
* A way to provide secured hard-links to view individual emails, so that a hard link can be included within the email to the user with a link like "Can't see this message? click here to see it in your browser"
56
+
* A better back-end to explore the queue in realtime, plus some beautiful statistical graphs.
52
57
53
58
# How to install #
54
59
* Clone the emailqueue repository wherever you want it.
@@ -95,21 +100,19 @@ This is where solutions like Emailqueue come in handy: Emailqueue is not an SMTP
95
100
* Send emails using the provided emailqueue_inject PHP class found in scripts/emailqueue_inject.class.php. See an example on how to use this class in example.php
96
101
* You can also inject messages to the queue by manually inserting them on the database via SQL (Insert in the "emails" table, read the field comments for detailed explanations)
97
102
103
+
# Migrate from Version 3.2 to Version 3.3 #
104
+
* Run `$ git pull` in your emailqueue directory to get the latest version.
105
+
* Using your database manager, select your emailqueue database and run the install/migrate_from_v3.2_to_v3.2.sql SQL file.
98
106
99
-
# Migrate to Version 3.2 #
107
+
# Migrate from Version 3.1 to Version 3.2 #
100
108
* Install this new 3.2 version following the regular Install process.
101
109
* Set up the same database connection parameters as your existing Emailqueue database. Note that some minor things have changed in db.config.inc.php and application.config.inc.php, so you cannot use the old ones.
102
110
* Using your database manager, select your emailqueue database and run the install/migrate_from_v3.1_to_v3.2.sql SQL file.
103
-
*run`$ composer update` on the installation dir to get the latest phpmailer libraries.
111
+
*Run`$ composer update` on the installation dir to get the latest phpmailer libraries.
104
112
105
113
106
114
# Migrating from versions older than v3.1 #
107
-
If you have a version of emailqueue older than v3.1 (released on december 26th, 2015), and want to upgrade to v.3.1 or above, execute the following SQL in your emailqueue database in order to migrate:
108
-
109
-
`ALTER TABLE emails ADD attachments TEXT NULL DEFAULT NULL;`
110
-
`ALTER TABLE emails ADD is_embed_images TINYINT(1) NOT NULL DEFAULT 0;`
111
-
112
-
No other changes are needed for the migration.
115
+
If you have a version of emailqueue older than v3.1 (released on december 26th, 2015), and want to upgrade to v.3.1 or above, using your database manager, select your emailqueue database and run the install/migrate_from_versions_older_than_v3.1.sql SQL file.
113
116
114
117
# How to use #
115
118
The file example.php is a thoroughly documented example on how to send an email using emailqueue using the provided emailqueue_inject PHP class, which is the recommended method. Here's what to do, anyway:
// Check if maximum delivery timeout have been reached
156
155
if ((mktime() - $timecontrol_start) > MAXIMUM_DELIVERY_TIMEOUT) {
157
-
if ($isOutputVerbose)
156
+
if ($isOutputVerbose) {
158
157
echo"Delivery proccess automatically stopped before it finished because of too many time spent on delivering. Time spent: ".(mktime() - $timecontrol_start)." seconds. Maximum time allowed: ".MAXIMUM_DELIVERY_TIMEOUT." seconds\n";
Copy file name to clipboardExpand all lines: install/emailqueue.sql
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,13 @@ CREATE TABLE `emails` (
15
15
`date_sent` datetime DEFAULT NULL COMMENT 'The date/time this email was delivered. Do not specify this field when manually inserting.',
16
16
`is_html`tinyint(1) UNSIGNED DEFAULT NULL COMMENT 'Whether this email''s content is HTML.',
17
17
`from`varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The email address of the sender.',
18
-
`from_name`varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Optional. The name of the sender.',
18
+
`from_name`varchar(255) CHARACTER SET utf8 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Optional. The name of the sender.',
19
19
`to`varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The email address of the recipient.',
20
20
`replyto`varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The email addess where replies to this message will be sent by default.',
21
-
`replyto_name`varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The name where this email will be replied by default.',
22
-
`subject` tinytext CHARACTER SET utf8 COLLATE utf8_unicode_ci COMMENT 'The email''s subject',
23
-
`content` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci COMMENT 'The content of the email. If HTML, be sure to set the is_html field to 1',
24
-
`content_nonhtml` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci COMMENT 'Optional. A plain-text version of the email for old clients.',
21
+
`replyto_name`varchar(255) CHARACTER SET utf8 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'The name where this email will be replied by default.',
22
+
`subject` tinytext CHARACTER SET utf8 COLLATE utf8mb4_bin COMMENT 'The email''s subject',
23
+
`content` longtext CHARACTER SET utf8 COLLATE utf8mb4_bin COMMENT 'The content of the email. If HTML, be sure to set the is_html field to 1',
24
+
`content_nonhtml` longtext CHARACTER SET utf8 COLLATE utf8mb4_bin COMMENT 'Optional. A plain-text version of the email for old clients.',
25
25
`list_unsubscribe_url`varchar(255) DEFAULT NULL COMMENT 'Optional. The URL where users can unsubscribe from the newsletter. Highly recommended.',
26
26
`attachments`text CHARACTER SET utf8 COLLATE utf8_unicode_ci COMMENT 'A serialized array of hash arrays specifying the files to be attached to this email. See example.php on how to build this array.',
27
27
`is_embed_images`tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Whether to automatically convert <IMG ... /> tags found on the email content to embedded images that are transferred along with the email itself instead of being referenced to external URLs. Can bring you some interesting benefits, but also hugely increases the data transfer.',
0 commit comments