journal
all ![]() | Rob is 20,118 days old today. |
Apr 2010 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
June 2010 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2009 jan feb mar apr may jun jul aug sep oct nov dec
2011 jan feb mar apr may jun jul aug sep oct nov dec |< << more >> >| |
Entries this day: Dream_magic_snowboarding zzzz_Cake_Mailer_for_Rob_Updates Dream magic snowboarding 1:50am ICT Tuesday 18 May 2010 (day 14664) Heard about a way to get across the river, that involved using the train trestle at times that the train wasn't on it. Christine and I were going to do it, but she wasn't sure if she could manage. We were both sure I could manage easily, which I did: the trestle was out towards the right and I went to it, and under it. Kept walking through the snow and came across a row of people standing in a line facing me. I realized they were just mannequins and there were numbers in front of each one indicating how tall they were; I went for the tallest one just to be snarky and was hopping up to it and then instead of climbing over it, I dodged around it at the last minute and then was past the river. I got to the snowboard area and basically realized it was illegal to do it, but also magical and one had to be in phase before one could see where to snowboard. Actually looking for the area wasn't a crime, but people were deterred from looking because one you found it, you couldn't be caught because of the phase shift. So I was trying to sneakily dig my snowboard non chalantly into the snow and then suddenly the snow fell open below me and I was in! Snowboarded down down into a deep game area where the basic idea was to dive down into a sheer hole in the snow really quickly and try to catch certain moments that were indicated by words of various lengths. I first caught the word "on", but then was able to expand that to "noon" and then made it to the bottom of the hole. The game floated me up to the top and then I immediately went down again, catching "wash" and then "washing" and then "washington" all in quick succession. There were other more advanced players, but everyone was having fun and supportive of others just by virtue that we couldn't be here if we didn't deserve to play. There were guys doing crazy flips and catching words like, "outstanding" and then "chiropractor" in a single drop or one guy who did crazy monkey flips sideways to catch "stress free somalia" and "downtown tibeten guru" in a single dive down the slope! I was utterly impressed, knowing he must have been doing this for years. I kept playing and playing, catching my three and four letter words, just having a blast and then the scene shifted so that I was out of phase again, looking for the next hole to drop down into the snow game. This time was harder to find, but I eventually found it, But once I got in, there was no snow; we were surfing down this grid of wooden mannequins and arm rests until we got to the bottom of a theater. At the bottom, were a bunch of men who were all warriors (MKP) and honoring one guy by lofting him over head. I was in character as a bird, and I could only jump with my legs together, or fly, though I wasn't very good at flying with human arms yet. But I hopped over to the guy and there were other people around who lofted him overhead, and I flew up to help as we carried him around the room. I was flying overhead, with one arm helping to guide and make sure he safely navigated the room, as he was pretty heavy and it was hard for the group to pick him up. Then we were standing back in a circle and someone asked when I would come back to play. as I woke up. I woke up on the deck of a small yacht and someone was asking me something, and I go yeah, I'm just acting as first mate because what better way to work on a yacht than be able to chill out on the top deck and make a hundred thousand dollars in two weeks. Then I woke up into this reality. dang. permalinkzzzz Cake Mailer for Rob Updates HI Joe I came across your code called Mailer on github a bit ago, and, given that you have several github-hosted Cake-plugins that appear to have straightforward installation instructions, I'm guessing you kinda know what you're doing. :-) I'd like to ask a couple of Qs, after I give a bit of background: I have some Perl code I wrote some years ago that sends emails to my list of a few hundred names. http://robnugen.com/wiki/Rob_updates.pl The feature that my code has that no other email sender has (that I've found) is "automatic address removal," meaning basically I want to periodically require users to say "I wanna stay on the list." I can set each users delete-date independently. So my family won't be asked until the year 2100, but the guy I just met at the bar will be removed in 2011, unless he requests otherwise. I'd like to rewrite my code in a bit more robust manner, so I'm looking at Cake and possibly forking your Mailer as a starting point. My question: does the "automatic address removal" feature seem easy to add to your code? (I won't ask you to add it, but I bet you know your code offhand better than I could figure out in a couple hours) I think it would just require two bits: 1) adding a removal date field to the user table (might get messy if that involves changing the Cake table) 2) then checking that date field when processing and do this: http://robnugen.com/wiki/Rob_updates.pl#faux-technical_explanation_of_automatic_email_removal Cheers - Rob -- http://robnugen.com Rob, Firstly, thanks for the email! Sounds like a pretty neat setup you've got going on. While you certainly could accomplish what you're doing currently with CakePHP, the functionality for periodically opting "back" into the email would have to be done outside of the Mailer plugin, reason being that it has no concept of outside rules that it should adhere to when sending email. You could easily utilize it however for sending your email after it's been vetted through your processes. This way you would still maintain your functionality without having to merge it into the plugin while still letting it do what it does best, send the email. I hope this answers your question. If you have any others please feel free to drop me a line. Sincerely, Joe HI Joe And thank you for your email! I scanned through the source of Mailer today, and distinctly did not notice any recipient handling code... but yes, as you say, plenty of code to handle sending messages. I'm guessing you must have some code not in the Mailer source that instantiates the classes defined in Mailer. In fact, I don't think I saw any code that wasn't a class definition. Is that right? Given what I saw in the code, and what you're saying below, I think I'd need to write a class that just maintains the statii of possible recipients, and then some code that orchestrates everything. Do you have examples of code that instantiates and calls Mailer classes? - Rob PS: though I'm replying immediately after yours, I'll probably not be able to get back to this until after the weekend (I'm going to Hong Kong for a workshop) (unless I can't get out of Chiang Mai at all due to protests, in which case I'll have plenty of time to play online.) Rob, The process for mailing is fairly straightforward. You add emails using the QueueComponent which lines up the emails for sending, from there the QueueShell attempts to send the emails out using your "transport" of choice. The plugin ships with a couple "transports" already available. If the QueueShell is unsuccessful it will increase the "tries" count for the email in question. It will, by default, attempt to send the email three times. If it is successful it will mark the "processed" column in your database to "1" to indicate a successful mailing. The system also defaults to using the "debug transport" for mailing which lets you monitor what it's trying to do. You can change this by passing a parameter when you start the shell. We have a crontab that runs the QueueShell periodically which allows it to clear out the email queue. You can execute the QueueShell like any other CakePHP shell. Here's a quick example of starting the QueueShell and passing it various parameters... $ cake mailer.queue process -transport pear -test true -limit 100 This would start the QueueShell and tell it to begin processing. It would attempt to use the PEAR transport (it ships with this) and it will do so in its testing mode (it won't actually send anything) and it will only work on the first 100 emails that are waiting to go out. Hopefully this helps get you on your feet. Have fun in Hong Kong and be safe! -Joepermalink prev day next day |