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

And I continue to struggle ;-) .. According to manual this is how I pass extra arguments to Sendmail:
#!/usr/bin/perl use strict; use Email::Simple; use Email::Simple::Creator; use Email::Send; my $email_raw = Email::Simple->create( header => [ From => 'x@x.org', To => 'y@y.org', Subject => 'z' ], body => 'a', ); # send it my $sender = Email::Send->new({mailer => 'Sendmail'}); $sender->send($email_raw, '--extra-arg');
Unfortunately, no matter how I try that --extra-arg just get lost somewhere in the middle and never reaches Sendmail.pm send function. Am I missing something here? Please.

Replies are listed 'Best First'.
Re: Email::Send::Sendmail (again) problem
by ikegami (Patriarch) on Jun 01, 2009 at 21:46 UTC

    According to manual this is how I pass extra arguments to Sendmail:

    Again, it doesn't say that at all. What it actually says is:

    Any remaining arguments will be passed directly into your defined message_modifier

    You neither defined a message_modifer, nor would it help if you did.

    Unfortunately, no matter how I try that --extra-arg just get lost somewhere in the middle and never reaches Sendmail.pm send function.

    Nor should it reach Sendmail's send.

    I think mailer_args will do the trick, though.

      Da! This is the moment where epiphany strikes. Think I've been staring at Email::Send::Sendmail's manual for too long seeing only "Any arguments passed to send will be passed to sendmail. The -t -oi arguments are sent automatically" Anyway thank you very much. You should have a donate page, buy me a pizza/beer style ;-) You always come first with answers.