MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: Order.pm modify for e-mail "from" field



******    message to minivend-users from Dan Busarow <dan@dpcsys.com>     ******

On Sun, 21 Mar 1999, Rob Zimmerman wrote:
> Ok. I am looking at the Util.pm module.
> I understand the -f switch and have made "mvend" a trusted user. I am 
> currently on the "lists and arrays" chapter of "learning Perl in 21days :-) so I 
> am a bit lacking here.....
> 
> I am running a virtual server so I need to make this argument a variable that 
> can be defined in the catalog.cfg or as a hidden input field on the order page. 
> I am going on a limb here so go easy....but would this work..
> 
> $from = _FROM_;         # variable defined in catalog.cfg
> $myadress = \-f $from;  # does the - have to be escaped?

There's probably a better way to do this but I just tried and this works

In checkout.html add

<input type=hidden name="send_from" value="your@address">

And then in Util.pm, sub send_mail

Add:

    if(!defined $from) {
        $from = $::Values->{'send_from'}
                ?  "-f $::Values->{'send_from'}"
                : '';
    }

Change:
open(Vend::MAIL,"|$Vend::Cfg->{SendMailProgram} $to") or last SEND;
To:
open(Vend::MAIL,"|$Vend::Cfg->{SendMailProgram} $from $to") or last SEND;


Dan
-- 
 Dan Busarow                                                  949 443 4172
 Dana Point Communications, Inc.                            dan@dpcsys.com
 Dana Point, California  83 09 EF 59 E0 11 89 B4   8D 09 DB FD E1 DD 0C 82

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: