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

comment on

( [id://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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-19 10:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found