[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Richard Applebaum: [MacPerl] Sendind Email from a CGI




------- Forwarded Message
From: Richard Applebaum <tickietoo@earthlink.net>
Reply-To: tickietoo@earthlink.net
Organization: SWW
X-Mailer: Mozilla 3.01Gold (Macintosh; I; PPC)
MIME-Version: 1.0
To: owner-mac-perl@iis.ee.ethz.ch
Subject: [MacPerl] Sendind Email from a CGI 
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I am trying to convert a shopping cart application I wrote, from a
proprietary system (subset of PERL  ).  I want to implement it on
MacPerl using Quid Pro Quo.

I can't figure out how to create and send email from within the CGI.

In the proprietary system I can send email with the following "format"
statement:
 
format email to $UsersEmailAddr from myname@mydomain.com subject "Online
Order" name $UserName;

 
Your order has been entered as follows:

     DATE:  $original_date     TIME: $original_time
     
  SOLD TO:  $SoNa
  ADDRESS:  $SoAd	
     CITY:  $SoCi, $SoSt   $SoZi
    PHONE:  $SoPh   
    EMAIL:  $SoEm

.   <---- Trailing period

Everything between the format statement and the trailing period is a
"picture" of how the email is to look (with substitution of the values
for $ variables).  

This is kind of like a "print <<" command except it formats & sends
email.

All the email examples I can find involve sending email by invoking an
email CGI from a form.  I want to invoke the email (CGI) from within my
own CGI which is invoked by a checkout form submission.

In fact, I want to send two separate emails (order acknowledgement &
vendor heads up).

Is there a way to send email from within a MacPerl CGI?

Is there a simple way to duplicate the format picture above? 

TIA

Dick

P.S. My ISP has a SMTP which I can Use to actually send the email...  or
I can (prefer) to use something that can run with Quid Pro Quo or a 
MacBased email server (or whatever)

------- End of Forwarded Message


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch