MiniVend Akopia Services

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

RE: Defining "From:" in email-confirmation



******    message to minivend-users from "Thompson-Jordan" <Thompson-Jordan@mindspring.com>     ******

> ******    message to minivend-users from Marius Schaefer
> <maillist@b-p-a.com>     ******

> I&#180;ve modified ~/mvend/form_mail.cfg :

Here are a few ideas. It might be better to handle "From:" like
"Reply-to:" so you could use one or the other. See code below. You might
also want to move $from to be the last parameter to make it compatable
with the current form_mail(). That way you could replace the current
form_mail() and not break the current code. Or clean up the parameters
like this ($to, $from, $reply, $subject, $body) and call it something like
send_mail().

> GlobalSub <<EndOfSub
> sub form_mail {
  +    my($to, $subject, $reply, $body, $from) = @_; #added from
>     my($ok);
>
>     $subject = '<no subject>' unless defined $subject && $subject;
>
  +   $from = '' unless defined $from;
  +   $from = "From: $from\n" if $from;
>     $reply = '' unless defined $reply;
>     $reply = "Reply-to: $reply\n" if $reply;
>
>     $ok = 0;
>     SEND: {
>         open(Vend::MAIL,"|$Vend::Cfg->{'SendMailProgram'} -t")
> or last SEND;
>         print Vend::MAIL
>    "To: $to\n",
> #   "From: $from\n",  # added from
>    $from,
>    $reply,
>    "Subject: $subject\n",
>    "Errors-To: $Vend::Cfg->{MailOrderTo}\n\n",
>    $body
>             or last SEND;
>         close Vend::MAIL or last SEND;
>         $ok = ($? == 0);
>     }
>
>     if (!$ok) {
>
> [...]
>
>
> and the receipt.html is modified in this way.
>
>  form_mail(
>             q{[value email]},
>             q{Vielen Dank f&#252;r Ihre Bestellung Nr. [value
> mv_order_number]!},
>             q{email@domain.de},
>             <<'EndOfMail',
>             q{email@domain.de})
> [...]
>
>
> Hope this helps.
>
> Gideon van Gelder wrote:
>
> > ******    message to minivend-users from "Gideon van Gelder"
> <gideon@swingmaster.nl>     ******
> >
> > Hi All,
> >
> > This is what a customer sees, who replies to my e-mail confirmation
> >
> > ----- Original Message -----
> > From: swingmasterrecords.com <gideon@furlong.seagull.net>
> > To: Gideon van Gelder <gideon@swingmaster.nl>
> > Sent: zaterdag 15 mei 1999 2:57
> > Subject: Thank you for placing your order at Swingmaster!
> >
> > How can I change this:
> >
> > From: swingmasterrecords.com <gideon@furlong.seagull.net>
> >
> > The "To:" and reply-to addresses are fine (defined in receipt.html).
> >
> > -> But how can I define "From:"
> >
> > Thanks in advance,
> >
> > -Gideon
> >
> > -
> > 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

-
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

-
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: