Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old November 30th, 2000, 08:38 AM
chrisdice4 chrisdice4 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Cape Town, WP, South Africa
Posts: 39 chrisdice4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
#!/usr/local/bin/perl

use CGI;
$q = new CGI;

$fname= $q->param('fname');
$fname= $q->param('sname');
$initials = $q->param('initials');
$title = $q->param('title');

$mail = '1';
$mailprog = '/var/qmail/bin/qmail-inject';
$recipient = 'c.dyason@ponl.com';
$email = 'chrisdice4@yahoo.com';

if ($mail eq '1') {
open (MAIL, "|$mailprog $recipient") | | die "Can't open $mailprog!n";

print MAIL "Reply-to: $emailn";
print MAIL "From: $email n";
print MAIL "Subject: Bond Applicationnn";
print MAIL "Succesfull Bond Applicant:nn";
print MAIL "------------------------------------------------------n";
print MAIL "this is a testn";
print MAIL "this is a test";

if ( $fname ){
print MAIL " <$fname>";
}

print MAIL "n";

if ( $sname ){
print MAIL "<$sname>";
}

if ( $initials){
print MAIL " <$initials>";
}

if ( $initials){
print MAIL " <$title>";
}
}

Reply With Quote
  #2  
Old December 6th, 2000, 08:42 AM
des des is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 73 des User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Haven't checked this out but 2 things occur to me

close (MAIL);

at the end

also should the recipient appear as

print MAIL "To: $recipientn"

and the open mail be something like this

open (MAIL, "| $mailprog -t -oi") | | die "Can't open $mailprog ! $_n";



[This message has been edited by des (edited December 06, 2000).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Mail cgi not working help please


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway