FAQ
When invoking Embperl::Mail I have to specify an inputfile, e.g.

Embperl::Mail::Execute({inputfile=>'msg.htm', subject=>'error $msgnr: $msgtxt', from=>'web@a2e.de', reply-to=>'oas@a2e.de', to=>'phm@a2e.de'}, );

Unfortunately msg.htm is a completely separate namespace which does not appear
to share any variables with the invoking file.

So my attempt to use Embperl::Mail for reporting something that just happened
failed. All I can send is the same old prefabricated messages.

Do I have to resort to generating a message file from within Embperl and
then sending that?

That would be a rather awkward workaround. In the docs I looked for ways to
send a text directly but didn't find it.

--
Hartmut Pilch 0049-89-12789608
FFII http://a2e.de/ffii



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org

Search Discussions

  • Gerald Richter at Feb 21, 2006 at 5:32 am

    When invoking Embperl::Mail I have to specify an inputfile, e.g.

    Embperl::Mail::Execute({inputfile=>'msg.htm',
    subject=>'error $msgnr: $msgtxt', from=>'web@a2e.de',
    reply-to=>'oas@a2e.de', to=>'phm@a2e.de'}, );

    Unfortunately msg.htm is a completely separate namespace
    which does not appear to share any variables with the invoking file.
    When you call it from another Embperl page, you get the same global Embperl
    variables, like %fdat, the Embperl request and application object ($epreq
    and $epapp). You can also pass parameters like:

    Embperl::Mail::Execute({inputfile=>'msg.htm',
    subject=>'error $msgnr: $msgtxt', from=>'web@a2e.de',
    reply-to=>'oas@a2e.de', to=>'phm@a2e.de'},

    param => [1,2,3],

    );

    These will appear in the msg.htm in @param

    Gerald




    ** Virus checked by BB-5000 Mailfilter **


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org
  • Robert Germic at Feb 21, 2006 at 6:01 am

    PILCH Hartmut wrote:
    When invoking Embperl::Mail I have to specify an inputfile, e.g.

    Embperl::Mail::Execute({inputfile=>'msg.htm', subject=>'error $msgnr: $msgtxt', from=>'web@a2e.de', reply-to=>'oas@a2e.de', to=>'phm@a2e.de'}, );

    Unfortunately msg.htm is a completely separate namespace which does not appear
    to share any variables with the invoking file.
    just use something like

    $mail = "error message";
    Embperl::Mail::Execute({ input => \$mail, mtime => undef, inputfile =>
    'error', to => ... });

    or use param to pass parameters to your msg.html

    - Robert
    So my attempt to use Embperl::Mail for reporting something that just happened
    failed. All I can send is the same old prefabricated messages.

    Do I have to resort to generating a message file from within Embperl and
    then sending that?

    That would be a rather awkward workaround. In the docs I looked for ways to
    send a text directly but didn't find it.

    --
    Hartmut Pilch 0049-89-12789608
    FFII http://a2e.de/ffii



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org

    --
    S pozdravem/Best Regards

    Robert Germic


    Prvni ceska virtualni s.r.o., Vinohradska 25/35, CZ-120 00 Praha 2
    Email: germic@pcv.cz, Mob. tel.: (+420 602) 213 480

    NetBooking Czech Republic s.r.o., Trebohostická 12, CZ-100 00 Praha 10
    Email: germic@netbooking.cz, Mob. tel.: (+420 602) 512 512


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org
  • PILCH Hartmut at Feb 21, 2006 at 3:08 pm

    just use something like

    $mail = "error message";
    Embperl::Mail::Execute({ input => \$mail, mtime => undef, inputfile =>
    'error', to => ... });
    Indeed this works, even without the inputfile=>'error' and mtime=>undef
    parameters it seems.

    I read on the archive at


    http://www.ecos.de/~mailarc/embperl/2005-04/msg00006.html


    that the "input=>\$mail" method didn't always work in the past and that
    apparently Gerald advises against using it. Also I can't find it in the
    docs. So I'm a bit concerned it might be somehow deprecated or not
    officially supported. Of course I prefer to specify an input string rather
    than an input file in most cases.

    --
    Hartmut Pilch
    http://a2e.de/phm





    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org
  • RobertCZ at Feb 21, 2006 at 4:56 pm
    no, input => \$mail is ok as long as you also specify inputfile =>
    'somename' (as is said clearly in the docs) otherwise embperl can't
    cache it correctly


    PILCH Hartmut wrote:
    just use something like

    $mail = "error message";
    Embperl::Mail::Execute({ input => \$mail, mtime => undef, inputfile =>
    'error', to => ... });
    Indeed this works, even without the inputfile=>'error' and mtime=>undef
    parameters it seems.

    I read on the archive at


    http://www.ecos.de/~mailarc/embperl/2005-04/msg00006.html


    that the "input=>\$mail" method didn't always work in the past and that
    apparently Gerald advises against using it. Also I can't find it in the
    docs. So I'm a bit concerned it might be somehow deprecated or not
    officially supported. Of course I prefer to specify an input string rather
    than an input file in most cases.

    --
    Hartmut Pilch
    http://a2e.de/phm





    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
    For additional commands, e-mail: embperl-help@perl.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupembperl @
categoriesmodperl, perl
postedFeb 20, '06 at 4:03p
activeFeb 21, '06 at 4:56p
posts5
users4
websiteperl.apache.org

People

Translate

site design / logo © 2022 Grokbase