MiniVend Akopia Services

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

RE: form_mail example



******    message to minivend-users from "Russ" <russ@khouse.org>     ******

Thank you for your help.  I got a 'test' on the reciept page after putting
in that return.  Then i put values in other returns to see how far it was
getting, and it got all the way through and worked.  Thanks!

One last thing, however, the From: field doesn't seem to be customizable.  I
tried adding a From: $reply\n to the print.

SEND: {
	open(Vend::FORMMAIL,"|$Vend::Cfg->{SendMailProgram} -t") or last SEND;
print Vend::FORMMAIL "From: $reply\n", "To: $to\n", $reply, "Subject:
$subject\n\n", $body                          	or last SEND;
                  close Vend::FORMMAIL or last SEND;
                  $ok = ($? == 0);
          }


However, this produced a server error.  In other perl programs i do this:
($mailprog is set to /usr/lib/sendmail of course.  &error is an error
reporting subroutine.)

open(MAIL, "|$mailprog $recipient") || &error;
	  print MAIL "From: $FORM{'email'}\n";
        print MAIL "Reply-to: $FORM{'email'}\n";
	  print MAIL "Subject: Subject\n\n";
        print MAIL "Name: $FORM{'firstname'} ";
        print MAIL "$FORM{'lastname'}\n";
        print MAIL "Location: $FORM{'location'}\n";
        print MAIL "Email: $FORM{'email'}\n";
        print MAIL "Question: $FORM{'question'}\n";
        print MAIL "$timestamp\n";
    close (MAIL);

I've looked at mvend/lib/Vend/Utils.pm at the mail delivery subroutine.  It
does the same thing as the form_mail sub, without the option of setting the
'From' field.

If you have any information that would help a lot!

Thank you,

Russ
-----Original Message-----
From: Ryan [mailto:rps@williams.com]
Sent: Thursday, January 21, 1999 5:57 AM
To: russ@khouse.org
Subject: RE: form_mail example


In the top of form_mail, put return "test"; this way you can
see if you are actually calling the sub ok.

Ryan

At 04:39 PM 1/20/99 -0800, you wrote:
>I did get the error before putting the form_mail sub in:
>
>xxx.xxx.xxx.xxx qUzgtZNs:nobody - [20/January/1999:09:55:01 -0800] newcb
>/cgi-bin/newcb/proc
>ess Undefined perl sub form_mail
>
>However, after putting in the sub, i get nothing.  No errors on the page,
no
>errors anywhere.
>
>Russ
>
>-----Original Message-----
>From: Ryan [mailto:rps@williams.com]
>Sent: Wednesday, January 20, 1999 3:00 PM
>To: russ@khouse.org
>Subject: Re: form_mail example
>
>
>I think we need some more information to help you Russ.
>Is there really nothing happening? Or do you have an error
>message somewhere to go on? On the page? In the error log?
>By default the form_mail sub returns some stuff to the
>page, a success or error message.
>
>If you are just having trouble calling the sub, consult
>the docs, its all there.
>
>You are correct in putting the perl code in the html file.
>Just put it in the one you want to send the email from.
>If you want to send them an email everytime they see
>their basket, put it there. I put mine in receipt.
>
>It does not need to be in any specific part of the page.
>Good luck.
>
>Ryan
>
>>Hello,
>>
>>I'm using the example found on
>>http://www.minivend.com/minivend/faq/06.12.How_can_I_send_an_email_copy_of
_
>.
>>html
>>The Global Sub is successfully declared in minivend.cfg, but I can't get
>any
>>Emails to be sent with it, using the example.
>>
>>Where do I put the [per arg .... /perl] code?  I've tried putting it in
the
>>report.html (as per instructions), reciept.html, and checkout.html pages.
>>How do I get this function to run?  Is there a specific part of the page
it
>>needs to go in?
>>
>>
>>Thank you,
>>Russ
>
>
>
>

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