Created
March 7, 2012 21:55
-
-
Save bcmiller/1996480 to your computer and use it in GitHub Desktop.
from an email
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The way I'd see it working is: | |
Use notifications api to define templates etc for your email | |
When you reach the point in your app where you send the email, add the email send request to the notifications queue. | |
Write a drush command which processes your queue | |
Implement drush daemon which monitors the queue at a configurable interval (1second+) and if it finds any items on it, sends them | |
You could go to one further level of abstraction and bypass notifications altogether, your user request that triggers the email send simply adds to a queue (use the queue api) containing the data of the user, the email template type and custom data (ie from a form) and then use drupal_mail to send the mail directly from the daemon monitored queue. | |
The benefit is that whilst volume are low to average your queue will process in as near to real time as makes no odds, but if you get a spike in load you're just adding to your queue and not impacting user experience as the mail server begins to creak. |
already went there. he wants a co-maintainer ... :)
On Wed, Mar 7, 2012 at 4:09 PM, Chris Chris < ***@***.*** > wrote:
http://drupal.org/project/drushd
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/1996480
##
_Bill Miller_
VP Web Technologies|
http://www.google.com/url?q=http%3A%2F%2Fwww.allplayers.com%2F&sa=D&sntz=1&usg=AFrqEzeqGP1EBJoAbGPoZ0-w0gj2GUhqNg
www.allplayers.comhttp://www.google.com/url?q=http%3A%2F%2Fwww.allplayers.com%2F&sa=D&sntz=1&usg=AFrqEzeqGP1EBJoAbGPoZ0-w0gj2GUhqNg
600 East Las Colinas Blvd. Suite 1525 | Irving, Texas 75039
Tel 214-234-9770 Ext. 204 | Fax 469-941-0590
##
APCI Disclaimer: This message and information contained in or attached to this communication is privileged and confidential and intended only for the person named above. If you are not the intended recipient of this transmission, you are hereby notified that any dissemination, distribution or copying of this communication to anyone other than the intended recipient is strictly prohibited. If you received this communication in error, please do not read it. Please immediately reply to the sender that you have received this communication in error and delete this communication from your computer. Thank you.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://drupal.org/project/drushd