Everything he says seems reasonable.

Posted in General at 11:52 pm by matt

Re: http://blogs.zdnet.com/BTL/?p=4562

I agree, the US has a good system that promotes industry and innovation. Not the best system possible, but a good one.

More examiners. Yep, need that.

More open process, yeah, that too.

I don’t think courts should defer to the examiner, though. There should be at least some scrutiny over their decisions.

I actually think rss feeds of applications and wikis for each application are a GOOD idea, as long as there’s regulation over identity. if you can see who is saying what, it matters. you dont want a company to show lots of evidence for its patent without being identified as having an interest.

Anyway, I have to reserve most of my judgment on this issue as I havent taken IP law yet. we’ll see where i stand after i take he class.


HTML Email with Text Plain Backup. Notes for MIME::Lite and PHP Pear

Posted in Email at 11:21 am by matt

Recently I’ve been working on some code that needed to have HTML email sent along with plain text email.  One application was the “email a photo” option for Resizr.com.  The other option, and the one where it wasn’t working right, was for PostOnce.net, basically a trucking logistics company.  The trucking industry isn’t the most high tech, and there are still people out there using email clients that don’t support HTML.

Anyway, here we go.

With PHP Pear, the code is smart enough to figure things out itself.  However, with MIME::Lite, you have to build the message yourself.

The answer to the problem is to use the “Multipart/Alternative” as your mime type, put the text/plain part first (for AOL support), and don’t attach the HTML as a file (attach it as data).


my $mime_msg = MIME::Lite->new(
    From => “matt@urbanpug.com”,
    To   => $email,
    Subject => ‘multipart/alternative’,
    Type => $mime_type,
) or die “Error creating MIME body: $!\n”;

$mime_msg->attach(Type => ‘text/plain’,
    Data => qq{ Your Message Body });

$mime_msg->attach(Type => ‘text/html’,
    Data => qq{ Your HTML Message Body });

However, I had a problem.  I was calling various scripts to build a big HTML file, which would then be attached, so i was doing:

$mime_msg->attach(Type => ‘text/html’,
    File => $html_file_path);

Don’t do that.  Instead, read the file into an array, then join the array into a string.  I dont know why, but some mail readers (including gmail) saw that the HTML attached was a file, and treated it as an attachment, rather than an alternative way of presenting the same message.

Hope this helps you!  If you have anything to add, reply!


Is this web 2.0?

Posted in General at 5:12 pm by matt

I thought this was REALLY well done.