Automatic emails for xkcd

Think your art is better or your stick figures worse? Got a link to a site you want to share? Post it here!

Moderators: Jacque, Moderators General, Prelates

What do you think of xkcdmailer?

Useful
27
40%
Not for me
37
55%
Crap
3
4%
 
Total votes: 67

Random832
Posts: 2525
Joined: Wed Oct 10, 2007 4:38 pm UTC

Re: Automatic emails for xkcd

Postby Random832 » Fri Apr 18, 2008 4:53 am UTC

abrenecki wrote:I don't want to validate full To: headers, just the addresses themselves. Also, I can see /r/n in the regex, which would appear to mean it would validate multiple addresses, which I do not want. Oh, and aargh.


I think line breaks are actually allowed in single addresses, technically - some obscure part of the standard. And multiple addresses are separated by commas, not newlines, anyway. But the point is, most of what you normally only associate with a "To: header" is actually a valid part of an e-mail address.

User avatar
abrenecki
Posts: 62
Joined: Mon Sep 10, 2007 8:39 am UTC
Location: Mid North SA, Australia

Re: Automatic emails for xkcd

Postby abrenecki » Sun Apr 20, 2008 2:29 am UTC

oh yeah, commas. (and i've been using email since age eight. *facepalm*) well, I can see commas too. and don't newlines delimit headers themselves? so, by allowing newlines, couldn't one allow mail header injection? (i'm too scared to put that monster into grep to find out)

edit: the following code is run before validation on both steps, so the plus-as-space problem should be fixed.

Code: Select all

str_ireplace(" ","+",$_GET['email']);

User avatar
TheTankengine
Our Fora-father
Posts: 3328
Joined: Tue Oct 17, 2006 2:09 pm UTC
Location: Louisville, KY
Contact:

Re: Automatic emails for xkcd

Postby TheTankengine » Fri Apr 25, 2008 7:06 am UTC

I've been getting the comics since you added me.

I really like the layout! It works very well for me because I often use my nokia 700 (internet tablet) and I can't get the alt-text with ease on that, so this is perfect. Also, I can actually see the comic on my phone with very limited screen real estate (I think the screen uses about 90x125 px or something like that for the internet).

tl;dr: Thanks!
be centered
be compassionate
be interesting

serviett
Posts: 33
Joined: Tue Aug 21, 2007 8:50 pm UTC
Location: Stjørdal, Norway
Contact:

Re: Automatic emails for xkcd

Postby serviett » Tue Apr 29, 2008 8:36 pm UTC

Um.. Halp.

I've signed up for xkcdmailer and it works great. (Delivered the last comic, anyhow).
However, there is one small problem: I did this mostly so I can read new XKCDs from my phone. I get the emails, i download the pictures, and .. they are in PNG format. Which my phone can show, but not zoom/browse around in full size. So i get to view the strips in a size which is exactly too small for any text to be readable or images to make sense.

Delivering the pictures in .jpg format would fix this as my phone can browse jpgs of any size and scroll around in them.

So, either
a) You change xkcdmailer to send the comics in jpg format (probably not a good idea because of artifacts and so on, i dunno)
b) You make a separate service just for me which does the same as xkcdmailer, but delivers pictures in jpg format
c) I make a service myself, where I can check the latest xkcd at glumsk.com/xkcd or something, which displays the newest comic (in jpg format) along with the title and alt text - and nothing more. In which case I'll probably need some help with the php.

I honestly don't expect you to do a) or b) for me, just thought I'd ask you before starting on a new project myself when you're so close to having what I need.

User avatar
abrenecki
Posts: 62
Joined: Mon Sep 10, 2007 8:39 am UTC
Location: Mid North SA, Australia

Re: Automatic emails for xkcd

Postby abrenecki » Tue May 06, 2008 9:29 am UTC

What I'll do is something like this:
<a href="http://hmcode.nfshost.com/xkcdmailer/convertJpgLive.php?source=$imgurl">View in JPEG Format</a> - I can also scale to a customised width for your device. I'm thinking of upgrading xkcdmailer to use MySQL, so what I might do is store whether or not you have a mobile device and deliver emails appropriately. Until then, though, does your email service support 'plus-addressing'? An easier way to do this is to add an email in the form myname+xkcdjpg@server.com and then when (future versions of) xkcdmailer sees the +xkcd-jpg it'll work it's magic.
Edit: JPEG is available for everyone via links. There is no need to do this now.
Last edited by abrenecki on Sun Jul 27, 2008 7:15 am UTC, edited 1 time in total.

serviett
Posts: 33
Joined: Tue Aug 21, 2007 8:50 pm UTC
Location: Stjørdal, Norway
Contact:

Re: Automatic emails for xkcd

Postby serviett » Tue May 06, 2008 2:03 pm UTC

Err, I tried it, but when I clicked the confirmation link it gave me a nice orange exclamation mark and the text "That's not an email". Does it support plus-adressing at your end? :p

(I have gmail)

User avatar
abrenecki
Posts: 62
Joined: Mon Sep 10, 2007 8:39 am UTC
Location: Mid North SA, Australia

Re: Automatic emails for xkcd

Postby abrenecki » Sun Jun 08, 2008 9:51 am UTC

xkcdmailer version 1.1 is running, which adds two links to the bottom of the email. One leads to this url, which is always a (on-the-fly rendered) jpeg version of the current comic from the copy stored on xkcdmailer's servers, and the other (the permalink one) leads to urls like this, which cause the server to grab the appropriat file from xkcd.com, and convert to jpeg on the fly. Please use the first if you're viewing the latest comic, and don't use it at all if you can see the png image (direct from xkcd.com) inline. Please also don't use these urls for any other purposes w/o asking me first.

Serviett, emails are validated using the following Perl extended regular expression:

Code: Select all

/^[a-z0-9\-\+._]*@[a-z0-9\-]*\.[a-z0-9\-.]*$/i

Basically, this means you can have (letters, numbers, dashes, pluses, dots or underscores)@(letters, numbers, dashes, and dots). So, as you can see, plus-addressing is supported. But, there might be something else in this regular expression that is rejecting your email. If your email matches this, tell me what it is and I'll try and fix the regex. If not, tell me which character doesn't match it, and I'll add it.

shadyraptors
Posts: 13
Joined: Fri Mar 27, 2009 3:09 pm UTC

Re: Automatic emails for xkcd

Postby shadyraptors » Tue Aug 11, 2009 8:36 pm UTC

www.ploogy.net
http://www.ploogy.net/xkcdmailer
You have requested a page or object that was not found on the server. This may be the result of a typo or broken link.
Image
HARDCORE PORNOGRAPHY
Image
I kinda started a blog. It is really wimpy.

User avatar
abrenecki
Posts: 62
Joined: Mon Sep 10, 2007 8:39 am UTC
Location: Mid North SA, Australia

Re: Automatic emails for xkcd

Postby abrenecki » Wed Aug 12, 2009 8:21 am UTC

Fixed link in first post.

User avatar
Moo
Oh man! I'm going to be so rebellious! I'm gonna...
Posts: 6437
Joined: Thu Aug 16, 2007 3:15 pm UTC
Location: Beyond the goblin city
Contact:

Re: Automatic emails for xkcd

Postby Moo » Wed Jun 23, 2010 8:11 am UTC

Super necro of awesomeness: I just wanted to thank abrenecki for this great mailer; my work blocks the xkcd site and by the time I get home I forget to check. Now the comics go straight to my work inbox, though, problem solved!

Thanks a million.
Proverbs 9:7-8 wrote:Anyone who rebukes a mocker will get an insult in return. Anyone who corrects the wicked will get hurt. So don't bother correcting mockers; they will only hate you.
Hawknc wrote:FFT: I didn't realise Proverbs 9:7-8 was the first recorded instance of "haters gonna hate"

User avatar
keozen
The Bearded FaiD Batman
Posts: 1497
Joined: Wed Aug 01, 2007 6:31 am UTC
Location: Yorkshire, UK
Contact:

Re: Automatic emails for xkcd

Postby keozen » Wed Jun 23, 2010 11:59 am UTC

Yeah I've been using this for Aaaaaaaaaaaaages and it rocks!
Image

User avatar
hintss
Posts: 1294
Joined: Wed Nov 25, 2009 7:19 am UTC
Contact:

Re: Automatic emails for xkcd

Postby hintss » Wed Jun 23, 2010 10:10 pm UTC

Moo wrote:Super necro of awesomeness: I just wanted to thank abrenecki for this great mailer; my work blocks the xkcd site and by the time I get home I forget to check. Now the comics go straight to my work inbox, though, problem solved!

Thanks a million.

xkcd.org, and http://cu.nniling.us/ ?

anyway, the xkcds come out on a regular schedule: midnight, randal time, monday, wednesday, friday: thrice a week...

User avatar
abrenecki
Posts: 62
Joined: Mon Sep 10, 2007 8:39 am UTC
Location: Mid North SA, Australia

Re: Automatic emails for xkcd

Postby abrenecki » Wed Jun 23, 2010 10:26 pm UTC

Moo & Keo: Thanks guys :D

And as far as proxy-avoidance domains go, cu.nniling.us is by far my favorite :) (Although, if someone checks your logs and sees "cunnilingus" in there questions might be asked...)

User avatar
Moo
Oh man! I'm going to be so rebellious! I'm gonna...
Posts: 6437
Joined: Thu Aug 16, 2007 3:15 pm UTC
Location: Beyond the goblin city
Contact:

Re: Automatic emails for xkcd

Postby Moo » Thu Jun 24, 2010 8:42 am UTC

hintss wrote:xkcd.org, and http://cu.nniling.us/ ?

anyway, the xkcds come out on a regular schedule: midnight, randal time, monday, wednesday, friday: thrice a week...
I am sure the second one is not a good idea to try at work but amazingly the first one worked, I never thought I'd say this but: thanks for your helpful post, hintss.

About the second part though: except when it's not on that schedule like 5-day series etc...


@abrenecki this is still really handy, I will definitely be using and recommending it.
Proverbs 9:7-8 wrote:Anyone who rebukes a mocker will get an insult in return. Anyone who corrects the wicked will get hurt. So don't bother correcting mockers; they will only hate you.
Hawknc wrote:FFT: I didn't realise Proverbs 9:7-8 was the first recorded instance of "haters gonna hate"

User avatar
hintss
Posts: 1294
Joined: Wed Nov 25, 2009 7:19 am UTC
Contact:

Re: Automatic emails for xkcd

Postby hintss » Thu Jun 24, 2010 4:55 pm UTC

then can't you poll it every day, or something?

User avatar
abrenecki
Posts: 62
Joined: Mon Sep 10, 2007 8:39 am UTC
Location: Mid North SA, Australia

Re: Automatic emails for xkcd

Postby abrenecki » Thu Jun 24, 2010 7:55 pm UTC

It polls at the frequency it does because i use an uptime checking service to query a webpage which triggers the poll, and that's how often it runs. The host it's on doesn't have cron.

I suppose the advantage to polling more frequently is it catches it if it's late without having to wait another day. Having said that, if I had access to cron it probably would only run once every day.

User avatar
Moo
Oh man! I'm going to be so rebellious! I'm gonna...
Posts: 6437
Joined: Thu Aug 16, 2007 3:15 pm UTC
Location: Beyond the goblin city
Contact:

Re: Automatic emails for xkcd

Postby Moo » Fri Jun 25, 2010 7:09 am UTC

Poop. xkcd.org is blocked today; as, it seems, is wherever the image in the mailer is pulled in from.
Proverbs 9:7-8 wrote:Anyone who rebukes a mocker will get an insult in return. Anyone who corrects the wicked will get hurt. So don't bother correcting mockers; they will only hate you.
Hawknc wrote:FFT: I didn't realise Proverbs 9:7-8 was the first recorded instance of "haters gonna hate"

User avatar
abrenecki
Posts: 62
Joined: Mon Sep 10, 2007 8:39 am UTC
Location: Mid North SA, Australia

Re: Automatic emails for xkcd

Postby abrenecki » Sat Jun 26, 2010 1:07 am UTC

The image in the mailer is pulled from imgs.xkcd.com. If you click the jpeg link in the email, however, you should still be able to see it, as that's hosted on my server. (The permalink next to it is more likely to actually work, btw.)


Return to “Your art and links”

Who is online

Users browsing this forum: No registered users and 3 guests