in reply to Re: HTML/Plain Text mail
in thread HTML/Plain Text mail

Thanks... Actually the process I am working on may potentially send out a few millions emails a week so performance is a huge concern. I have been using MIME::Lite and it is easy and works well. I found the 'multipart/alternative' flag in the Perldoc for Mime::Lite. My only question is that by using this approach you are potentially doubling the size of the email. Will this cause evil things to happen to the smtp server? Also, is there a way to compress the email?

Thanks again,
TAC

Replies are listed 'Best First'.
Re: Re: Re: HTML/Plain Text mail
by gav^ (Curate) on Jan 05, 2002 at 03:22 UTC
    Basically I split everything up into 4 messages:
    • Text people
    • AOL people, they get the text message but with the links/mailto's converted into HTML. This seems to give them clickable links which is nice.
    • HTML
    • Unknown people get MIME - use MIME::Lite to give them a multipart/alternative message.
    The text message tends to be pretty small, it's just a short bit of text to try to encourage somebody to go to a link. We work out if somebody is Text/HTML by embedding an invisible pixel in the email and giving them a couple of mailings to load it.

    If you are sending out hundreds of thousands of messages there are serious network/server issues. When we first started we killed out network as our firewall didn't have enough performance to handle a large amount of small connections.

    There is also the problem that 500,000 emails tends to be about 8 gig. This tends to be a very I/O bound operation and takes quite a while.

    How we handle things is we run postfix as our mail server. We first spool everything (without sending a single message) then let it go. We then throttle it so we're sending 40,000 or so an hour without killing our T1.

    There's also issues with web server load. It killed our client's webserver when it got that much extra traffic going there. There's also the problem about handling unsubscribes etc.

    And no, I don't spend all day sending spam :)

Re: Re: Re: HTML/Plain Text mail
by Kickstart (Pilgrim) on Jan 05, 2002 at 04:31 UTC
    Well that sounds like spam! :) If I may...to what purpose?

    This definitely does double the size of the emails...you've reminded me of something that Apache does...there is a negotiation compression with clients that have compression enable to cut down the costs of bandwidth. I wonder if there is a related thing with SMTP and POP/IMAP?

    Something to look into, anyway.

    Kickstart