Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

MIME::Lite seems to misbehave in a strange way....

by blue_cowdawg (Monsignor)
on Jul 11, 2007 at 14:06 UTC ( [id://626014]=perlquestion: print w/replies, xml ) Need Help??

blue_cowdawg has asked for the wisdom of the Perl Monks concerning the following question:

Folks, I'm writing a fairly simple application for one of the clubs I belong to. It reads events out of a database and emails those events as an upcoming events to the membership email list. I've done this sort of thing before so this shouldn't be rocket science.

Yet, something clearly bizarre is happening.

I've created a simple module that does the dirty work of setting up MIME::Lite as well as storing the subject, etc. etc. but I'll spare you the details and get to the nitty gritty. Here is the heart of the matter:

sub send { my $self=shift; if ( $_[0] ) { $self->{message_body} = shift; } my $msg = MIME::Lite->new( From=>'web-committee@bayshoredogclub.org', To=> 'members@bayshoredogclub.org', Subject => $self->{subject}, Type=>"TEXT", Data=> $self->{message_body} ); $msg->send(); }
Should work, right? It messes up....

The recipient that is passed in is a Mailman mail list. When the email gets to the list and the members of the list actually see it this is what they see:

An embedded and charset-unspecified text was scrubbed... Name: not available Url: <url snipped off>

If I change the recipient to a normal email account (like my own) the text comes through just fine. What is this odd seeming interaction between MIME::Lite and Mailman? Anymonk have any insight into this?


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Replies are listed 'Best First'.
Re: MIME::Lite seems to misbehave in a strange way....
by philcrow (Priest) on Jul 11, 2007 at 14:43 UTC
    I had exactly this problem with a webmail client earlier in the year. All of my posts from it to a mailing list were marked just as you say. I changed the Type and used an Encoding key:
    'Type' => 'text/plain; charset="us-ascii"', 'Encoding' => '-SUGGEST',
    All went well after that for me. YMMV.

    Phil

    The Gantry Web Framework Book is now available.

      Thanks philcrow!
      Setting the 'Type' definitely worked. The encoding type of "-SUGGEST" resulted in an error, but that's probably a versionitis thing. Once I set the encoding type and character set Mailman was happy again.


      Peter L. Berghold -- Unix Professional
      Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://626014]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-03-28 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found