Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Canned Emails – a minimal site with prewritten emails (cannedemails.com)
137 points by davidmerriman on Feb 14, 2015 | hide | past | favorite | 35 comments


Today I contributed to the greater good of society:

  var output = "";
  $('h2 a').each(function(i) {
      output += "TITLE: " + $.trim(this.innerHTML) + "\n";
      var email = decodeURIComponent(this.href).slice(13).split("&subject=");
      output += "SUBJECT: " + email[1] + "\n";
      output += "BODY:\n" + email[0].replace(/\n( )+/g, "\n") + "\n\n\n\n";
      console.log(output);
  });
That being said I love the site :)


Slightly tweaked your script to display inline

    $("h2 a").each(function(){
       var email = decodeURIComponent(this.href).slice(13).split("&subject=");
       var subject = email[1];
       var body = email[0].replace(/\n( )+/g, "\n");
       var parent = $(this).parent("h2")
       parent.after($("<div />").text(body));
       parent.after($("<h4 />").text(subject));
    });


This is great! For anyone wondering, use this one.


SO much easier reading it this way :D


   console.log(output); 
needs to be last line outside each() :) Or move var content = "" inside each()


Whoops, you're right, console.log was supposed to be at the very bottom of the script. By default most browser consoles scroll you to the bottom of the output, so I just read the first half scrolling up and never noticed. No matter, amarraja's version is much better.


Neat. Would be handy though if you could preview the text without it opening a mailto


I think this is the first site I came across that is easier to read as source.


Ha, true. It's not too bad actually.


I can tell these are written really well because the voice that I hear in my head as I read them is your typical insincere Silicon Valleyite. Well done!


Wow, so much potential.

There's some weird formatting going on though. I might be using slightly old and lightweight e-mail client (M2 in Opera12), but I still don't think it should look like this http://puu.sh/fTYSp/c4f0a3bb84.png


It's because of the templating, each secondary line has a lot of space in front. Could be fixed if the template/source were left aligned.


Same thing happening with 31.4.0 on Arch Linux.


same with Mail.app on OSX 10.10


The fact that there's a canned e-mail for breaking up is slightly disturbing.


Just slightly? This is what led me to believe at first that the site is meant to be humorous and not something serious.

Why not add a canned mail for "will you marry me?", "Your parents were involved in a crash" and "you have 6 months to live" ?

Also, if someone will send me an "Hey. How's it going?" canned mail, I can assure you they won't be hearing from me.

I admit I find it hard to fathom how someone would have such a lack of respect for their relationships with other people (and therefore, implicitly, lack of respect for themselves) that they would actually use this for personal communication.


Hi Placebo how's it going? I saw those pictures you posted on Facebook recently (omg that plate of food you were eating looked so delish!), they sure brightened up my day. They also reminded me it's been awhile since we've spoken and I miss catching up with you. We should plan to see each other in some future non-specific event, let me know when you think it's a good time and I'll send you my public Google calendar so you can check if I'm busy that day. I also want you to know how special your friendship is to me and that you should feel free to reach out to me with a direct message on Twitter at any time. Well placebo, I'm glad we had this talk, have a great day!


Still I don't know how to avoid that the annoying Apple mail program opens all the mails and not Gmail's compose view within in the browser. Thus, I'd also agree to just get a text preview from the text and maybe not just one version but many curated from users as a next feature.


While on Gmail, in e.g. Chrome, look in the address bar for a symbol like <> and click it. More info: https://support.google.com/chrome/answer/1382847?hl=en


Thanks! this works!


It would be better if you set the body for each email with JavaScript and the new lines with "%0A" instead of the indented HTML code. Or don't use indented HTML code for the body blocks. The indented HTML code has also effect of the style of the email: the first line is normal, the second line and all following lines are indented with 25 spaces. This looks strange.

However, I like the idea of this website.


Ironically enough clicking on "apologize from problem / bug" crashed Firefox.


The email body seems to be prefixed with the following, which is showing in my webmail editor (Roundcube). Is it a problem with my configuration or this site?

<!-- html ignored --><!-- head ignored --><!-- meta ignored --><body><p>


The text the site tries to put in the mail is pure text, not HTML, so I'd think it is Roundcube that is messing it up.


I thoroughly enjoy the fact that there's a breakup email. Hopefully we'll get more canned emails in the future.


"apologize from problem / bug" should be "apologize for..."

Otherwise, very cool.


You should never ask to ask for a question. And you shouldn't announce your question.

Just ask.


Similarly, I believe you shouldn't ask strangers how are they or even use it as a greeting.


It helps to understand that asking how someone is at the start of a conversation should generally be interpreted as a social convention rather than a literal question.

The socially correct response is either something like "fine", or to repeat the question. Note that if you're going to answer it as a question, the correct answer is always "fine" regardless of whether one really is fine; if you said something like "terrible" you'd be obliging a stranger to pry into your personal business. The fabric of society is very complex, as someone once said.

These are all valid in various dialects/registers of native English:

Greeting: How are you?

Response: Fine, thank you

-

Greeting: How are you?

Response: How are you?

-

Greeting: How do you do

Response: How do you do

-

Greeting: Sup

Response: Sup


Thanks, I really needed the breakup letter!


Does their "unsubscribe aggressively" link work for their own site? I never want to see anything generated by this.


This is pretty awesome, thanks dave!


nothing happens when I click on the links.


It is using the mailto URI, so if no mail client is set to default for you nothing would happen.


This is so misleading, clearly they are not prewritten.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: