Re: django app for managing sending email to users...
On 10/08/2007, at 11:41 PM, Andrew wrote: > I'm so happy that you've taken the initiaive with this. I'm happy to > help code -- just let me know how. Would be great to have you on board. To help, I suggest you a) subscribe to the django-mailer list http://groups.google.com/group/django-mailer b) look at the use cases and initial design thoughts http://code.google.com/p/django-mailer/ http://code.google.com/p/django-mailer/wiki/InitialDesignThoughts c) checkout the latest code (still in its infancy) http://code.google.com/p/django-mailer/source > One thing to think about: how does the communication between the > email- > app and the main app work? On Fluther right now we're running our > django mailer on a different thread because initiating a connection to > the SMTP server from a web request takes a LONG time -- it looks like > the page hangs. For the reasons you give, it's done asynchronously. The main app just puts the message on a queue and a separate process picks it up and sends it. James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
James - I'm so happy that you've taken the initiaive with this. I'm happy to help code -- just let me know how. One thing to think about: how does the communication between the email- app and the main app work? On Fluther right now we're running our django mailer on a different thread because initiating a connection to the SMTP server from a web request takes a LONG time -- it looks like the page hangs. Again, happy to help. Andrew McClain On Aug 8, 10:38 am, "Kai Kuehne" <[EMAIL PROTECTED]> wrote: > Hi, > > On 8/8/07, James Tauber <[EMAIL PROTECTED]> wrote: > > > My point is that you just need an iterable. Both lists and QuerySets > > meet this requirement. > > > There is no casting in Python. You don't need to "cast" a QuerySet to > > a list. > > Sorry.. I mixed my thoughts a bit. I shouldn't post to the list in times where > I should be in my bed. :-) I first thought it could be useful to pass just > the > userids as list ([1, 2, 3]) but the objects are much better! In this case, > casting is not needed. > > > James > > Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
Hi, On 8/8/07, James Tauber <[EMAIL PROTECTED]> wrote: > My point is that you just need an iterable. Both lists and QuerySets > meet this requirement. > > There is no casting in Python. You don't need to "cast" a QuerySet to > a list. Sorry.. I mixed my thoughts a bit. I shouldn't post to the list in times where I should be in my bed. :-) I first thought it could be useful to pass just the userids as list ([1, 2, 3]) but the objects are much better! In this case, casting is not needed. > James Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
My point is that you just need an iterable. Both lists and QuerySets meet this requirement. There is no casting in Python. You don't need to "cast" a QuerySet to a list. James On 08/08/2007, at 12:05 PM, Kai Kuehne wrote: > > Sure, that's not the point. The point is that the user has to > give the function a QuerySet. Imho, it should be a QureySet > *or* a list.. was just an idea. You're the boss. :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
Sure, that's not the point. The point is that the user has to give the function a QuerySet. Imho, it should be a QureySet *or* a list.. was just an idea. You're the boss. :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: {SPAM 01.3} Re: django app for managing sending email to users...
On 07/08/2007, at 11:42 AM, Ramdas S wrote: > > I am not very sure whether the bulk-mail support personalization. > > I think that should be an important feature. Yes, it will support templates with the user passed in the context. James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
On 07/08/2007, at 10:16 AM, Kai Kuehne wrote: > Just a question: > Why not add this bulk-email-support in the first place? E.g., the > function would > take a list of contrib.auth.models.User objects and iterate over > it. You could > check whether it's a QuerySet and cast it to list if needed. The first release *will* support bulk email. It's just architecturally separate from the send queue. Iterating over a query set containing users is exactly how to do it. Except you don't need to cast it to a list -- query sets are iterable already: for user in User.objects.all(): # do stuff James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
I've checked in a first pass at the lowest layer of the architecture: the queue and send loop, don't send list and log. http://code.google.com/p/django-mailer/ It doesn't actually send email at the moment, just tells you it's done so, but it's enough to show how the bottom layer works. I've also, at the request of a couple of people, set up a Google group. I'll move design discussions there (so join if you want to participate) but give occasional updates here. http://groups.google.com/group/django-mailer James On 05/08/2007, at 3:23 PM, James Tauber wrote: > > > I've set up django-mailer at Google Code: > > http://code.google.com/p/django-mailer/ > > and written down a bunch of notes on the home page about use cases > and functional requirements. > > If no one objects, we can continue discussion on this list, although > I'm happy to start up django-mailer list at Google Groups if people > prefer. > > James > -- > James Tauber http://jtauber.com/ > journeyman of some http://jtauber.com/blog/ > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
Hi, On 8/7/07, Ramdas S <[EMAIL PROTECTED]> wrote: > > I am not very sure whether the bulk-mail support personalization. > > I think that should be an important feature. > > More importantly, is there any way to scale it up to handle large > volumes of mails a day without falling into the spam black list trap > > RS I don't understand you. Please don't quote me, if you're not answering to my post. Greetings Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
I have an implementation of a mass mailing functionality. Basically a "campaign" is constructed in the admin interface. There is a preview field and if filled it short-circuits the save functionality. If the preview is left blank users and a campaign id are put into a "dispatch" table where each entry is marked as "not-sent". There is a cronjob on my box that runs a standalone Django script that sends off batches of x emails at y interval from the "not-sent" entries in the dispatch table. I've also written code so that admins can follow the progress of the dispatches (in percentages). I also have a simple sign- up and unsubscribe feature that ties in. Some other features I'd like to incorporate: Fexibility with templates of emails. Maybe pick from a drop-down. A "mailbug" feature. This is a hidden .gif in each email. When downloaded it hits a counter on the server with a hash that corresponds to that dispatch and marks it as read. Of course this is only when images are downloaded but a good indicator of the emails "success" if you want. Optional verification of email addresses. If anyone is interested in this code I'll happily contribute! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
I am not very sure whether the bulk-mail support personalization. I think that should be an important feature. More importantly, is there any way to scale it up to handle large volumes of mails a day without falling into the spam black list trap RS On Aug 7, 7:16 pm, "Kai Kuehne" <[EMAIL PROTECTED]> wrote: > Hi James, > > On 8/7/07, James Tauber <[EMAIL PROTECTED]> wrote: > > > > > Also posted to > > >http://code.google.com/p/django-mailer/wiki/InitialDesignThoughts > > From the site: > > So after a first pass of the lowest layer (described above) is done, I plan > > to add this kind of bulk email support per the previous paragraph. > > Just a question: > Why not add this bulk-email-support in the first place? E.g., the function > would > take a list of contrib.auth.models.User objects and iterate over it. You could > check whether it's a QuerySet and cast it to list if needed. > > I'm relatively new to both python and django so I'm probably missing > some important point here. > > Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
Hi James, On 8/7/07, James Tauber <[EMAIL PROTECTED]> wrote: > > Also posted to > > http://code.google.com/p/django-mailer/wiki/InitialDesignThoughts > From the site: > So after a first pass of the lowest layer (described above) is done, I plan > to add this kind of bulk email support per the previous paragraph. Just a question: Why not add this bulk-email-support in the first place? E.g., the function would take a list of contrib.auth.models.User objects and iterate over it. You could check whether it's a QuerySet and cast it to list if needed. I'm relatively new to both python and django so I'm probably missing some important point here. Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
Also posted to http://code.google.com/p/django-mailer/wiki/InitialDesignThoughts I'll check in some initial models in the next day or so. James On 07/08/2007, at 9:04 AM, James Tauber wrote: > Here are some more thoughts below which I'll add to the project wiki > soon: [snip] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
On 06/08/2007, at 9:40 AM, Fabien Schwob wrote: > How is it possible to help ? I'm about to write somethink like > django-mailer for a website I maintain, so I think it's better to > contribute to django-mailer. > > Does you already have an idea of the architecture of this future app ? First of all look at the notes on http://code.google.com/p/django- mailer/ Here are some more thoughts below which I'll add to the project wiki soon: I'm a big believe in a step-by-step approach so I was going to postpone support for deferred sending (e.g. send this email out at 3am tomorrow morning), recurring email (e.g. password change reminders) and for box-carring (i.e. putting multiple notifications in a single email) until later releases -- especially as a believe these can be cleanly layered on top of the basic functionality. With these features initially removed, the models I have in mind is fairly straight forward. The main model will just be a queue of fully resolved messages to send as soon as possible. By "fully resolved" I mean that any template processing will take place before the message gets added to this model. So, in other words, the model will contain the literal to, from, subject and message body as well as a datetime of when the message was added to the queue. I'm also thinking of a three-way priority -- high, medium, low (see below for what this means). I'm thinking of implementing the "don't send" list at this level, so even if you put an email to someone in this low-level queue, it won't get sent if the email address is on the don't send list. From experience, it's worth implementing this kind of opt-out support right from the beginning, so the initial version will have this second model, a simple list of email address not to send to, perhaps along with a datetime of when the opt-out was added. The third model for this initial version is a log. Regardless of whether a send succeeds or not, it is logged in this model. A separate process can be responsible for retries, rolling to file- based logs, archiving or whatever. I am inclined to include everything in this model that is included in the first model (including the message body). In additional there would be a datetime of when the send was attempted, a status code and some free-text field to capture an exception. I believe that all other features including retries, deferral and box- carring can be implemented on top of this layer with little or no modification. One thing I haven't thought enough about is how this bottom layer would handle (or integrate with handling of) mail delivery failures that come back as email (rather than exceptions thrown by SMTP subsystem). Things to consider are how to correlate the mail delivery failure email and exactly what to correlate it with (the entry in the log model?) One thing the above models do not consider is the possibility of multiple queues. I'm calling YAGNI on that at the moment. So there would need to be one process that, when invoked would simply go through the queue, attempting to send each email (after checking the don't send list) and logging the result. My thoughts about priorities are that the "sender process" should first go through any "high" priority sorted by age (how long they'd been in the queue), then any "medium" sorted by age, then any "low" similarly sorted by age. Finally there should be a view and template for showing basic status of the django-mailer system. Obviously later releases will add functionality on top, mostly concerned with how to get things in the queue and when to put them there. So my initial plan is to implement what I've described above. But there needs to still be, for the system to be usable for more than just one-off emails to individuals, a basic mechanism for adding bulk mail to the queue. The simplest case is one where an identical (i.e. no templating) text email is sent to all users. Adding templating support is only a small step from that, assuming that the template just receives a user object in the context. Then what is needed is a query set of what users to mail to. So bulk email is achieved by running a choice of query set + template and adding each result to the message queue in the layer described above. So after a first pass of the lowest layer (described above) is done, I plan to add this kind of bulk email support per the previous paragraph. Thoughts? (again, I'm happy to take this to a dedicated list if people prefer) James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en
Re: django app for managing sending email to users...
Hello, > I've set up django-mailer at Google Code: > > http://code.google.com/p/django-mailer/ > > and written down a bunch of notes on the home page about use cases > and functional requirements. > > If no one objects, we can continue discussion on this list, although > I'm happy to start up django-mailer list at Google Groups if people > prefer. How is it possible to help ? I'm about to write somethink like django-mailer for a website I maintain, so I think it's better to contribute to django-mailer. Does you already have an idea of the architecture of this future app ? -- Fabien SCHWOB --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
I've set up django-mailer at Google Code: http://code.google.com/p/django-mailer/ and written down a bunch of notes on the home page about use cases and functional requirements. If no one objects, we can continue discussion on this list, although I'm happy to start up django-mailer list at Google Groups if people prefer. James -- James Tauber http://jtauber.com/ journeyman of some http://jtauber.com/blog/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
On 3 Aug 2007, at 3:55 pm, James Tauber wrote: A number of sites I'm working on will optionally notify users of certain events via email. Think of the email you get from a social networking site when someone wants to add you as a friend. Or forum software that emails subscribers to a thread when there's been a new post. I also have the occasional need to send administrative email to all users on a site or announcements to those that have opted-in to receive them (although my own preference in that case is for there to be an Atom feed). I was thinking of developing a django app for this with support for queuing and throttling of sends, scheduled sends, and logging of mail failures. I'm NOT interested at all in using it for unsolicited email (although unfortunately there's nothing in the design I have in mind that would prevent its use for that, I don't think) I think I would find this useful a *lot* for work, so I would be very happy to help, if necessary. Thanks, Dave -- David Reynolds [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Re: django app for managing sending email to users...
Great, I'll start something at Google Code Project Hosting and whatever you (or anyone else) can help with will be most welcome. django-mailer will probably be the project name. James On 03/08/2007, at 5:12 PM, Jacob Kaplan-Moss wrote: > > On 8/3/07, James Tauber <[EMAIL PROTECTED]> wrote: >> I was thinking of developing a django app for this with support for >> queuing and throttling of sends, scheduled sends, and logging of mail >> failures. I'm NOT interested at all in using it for unsolicited email >> (although unfortunately there's nothing in the design I have in mind >> that would prevent its use for that, I don't think) >> >> But I wanted to check first if anyone has developed something like >> this? > > We've got something internally (as part of Ellington) that handles > these sorts of tasks, but it's somewhat half-assed. If you wanted to > start a public project, I can probably kick in some of the more > fully-assed parts of our code. > > I'd have to check with management, of course, but given our track > record and our need for a robust email system I'm pretty sure the > answer'll be yes. > > Jacob > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
On 03/08/2007, at 5:55 PM, Bram - Smartelectronix wrote: > I'm exactly in the same situation, with the same needs for > splicemusic.com. Right now I have a big loop which goes over all > users, > and for each user checks if there are any new events that happened. > > This scales really badly, and would definitely need some kind of > fix, so > I'm very interested in any solutions you guys might come up with. With a mail out system like I've described, would you envisage being able to queue the email *at the time the event happens* rather than looping over the users? If so, I assume you'd expect the mail out system to consolidate multiple events if they occurred within a set period of time. So in other words, the system would allow queuing of not only entire emails, but components of an email (let's call them "sub-messages") and when some threshold is reached (either time passed or number of sub-messages queued up) an email is constructed and sent. James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
Jacob Kaplan-Moss wrote: > On 8/3/07, James Tauber <[EMAIL PROTECTED]> wrote: >> I was thinking of developing a django app for this with support for >> queuing and throttling of sends, scheduled sends, and logging of mail >> failures. I'm NOT interested at all in using it for unsolicited email >> (although unfortunately there's nothing in the design I have in mind >> that would prevent its use for that, I don't think) >> >> But I wanted to check first if anyone has developed something like this? > > We've got something internally (as part of Ellington) that handles > these sorts of tasks, but it's somewhat half-assed. If you wanted to > start a public project, I can probably kick in some of the more > fully-assed parts of our code. > > I'd have to check with management, of course, but given our track > record and our need for a robust email system I'm pretty sure the > answer'll be yes. I'm exactly in the same situation, with the same needs for splicemusic.com. Right now I have a big loop which goes over all users, and for each user checks if there are any new events that happened. This scales really badly, and would definitely need some kind of fix, so I'm very interested in any solutions you guys might come up with. - bram --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django app for managing sending email to users...
On 8/3/07, James Tauber <[EMAIL PROTECTED]> wrote: > I was thinking of developing a django app for this with support for > queuing and throttling of sends, scheduled sends, and logging of mail > failures. I'm NOT interested at all in using it for unsolicited email > (although unfortunately there's nothing in the design I have in mind > that would prevent its use for that, I don't think) > > But I wanted to check first if anyone has developed something like this? We've got something internally (as part of Ellington) that handles these sorts of tasks, but it's somewhat half-assed. If you wanted to start a public project, I can probably kick in some of the more fully-assed parts of our code. I'd have to check with management, of course, but given our track record and our need for a robust email system I'm pretty sure the answer'll be yes. Jacob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
django app for managing sending email to users...
A number of sites I'm working on will optionally notify users of certain events via email. Think of the email you get from a social networking site when someone wants to add you as a friend. Or forum software that emails subscribers to a thread when there's been a new post. I also have the occasional need to send administrative email to all users on a site or announcements to those that have opted-in to receive them (although my own preference in that case is for there to be an Atom feed). I was thinking of developing a django app for this with support for queuing and throttling of sends, scheduled sends, and logging of mail failures. I'm NOT interested at all in using it for unsolicited email (although unfortunately there's nothing in the design I have in mind that would prevent its use for that, I don't think) But I wanted to check first if anyone has developed something like this? James (cross-posted to django-hotclub as it's a potentially useful addition to the nascent Hot Club of France suite of apps) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---