Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Hi all,

I'm developing an application on OS X (10.5.7) using Apache (2.2.11), mod_perl (2.0.2) and Mason. I'm using MIME::Entity to create an email, like this (error checking omitted for clarity):

use MIME::Entity; my $entity = MIME::Entity->build ( To => $to, From => $from, Cc => $cc, Subject => $subject, Data => "$body\n" ); open (MAIL, "|/usr/bin/mail"); $entity->print(\*MAIL); close(MAIL);

The problem is that nothing seems to happen. I've used similar code on a Solaris system, where I invoked mail with the "-t" option. On OS X the "-t" option gives me a "broken pipe" error message on the close command. Without that option, no error messages appear, but no mail appears to be sent.

I have looked at the manpage for the OS X mail command and didn't find any help, but it's possible I missed something.

Has anyone been down this road before? Can you point me in the right direction?


In reply to Sending a MIME::Entity email on OS X by mboudreau

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others examining the Monastery: (17)
    As of 2014-09-17 12:08 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (74 votes), past polls