mdedens Posted April 17, 2004 Posted April 17, 2004 Hi, I'm having trouble getting Soupermail to work. This .pl file plus a MIME file go in my cgi-bin folder, and I chmod ed them 755... i hope that's right. I'll highlight in red the variables I don't know, in hopes that somebody can help me out. In particular, i don't understand the "private" url? >#!/usr/bin/perl -- # -*-mode: Perl; tab-width: 4 -*- my $relVersion = "1.0.8"; ############################################################################ # Soupermail # # Internal build version: # $Id: soupermail.pl,v 1.136 2001/02/07 22:04:55 aithalv Exp $ # # Soupermail. A whacky and powerful WWW to Email form handler. # Copyright (C) 1998, 1999, 2000, 2001 # Vittal Aithal <vittal.aithal@bigfoot.com> # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See # the GNU General Public License for more details. You should have received # a copy of the GNU General Public License along with this program; if not, # write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, # MA 02139, USA. # ############################################################################ ############################################################################ # Set up the modules soupermail uses - these should all be perl5 standard ############################################################################ use lib qw(. /home/myusername/public_html/cgi-bin); use CGI; use FileHandle; use File::Copy; use Fcntl qw(:DEFAULT :flock); use Time::Local; use POSIX qw(floor); use MIME::Lite; use strict; use 5.004; # Not all systems will have DBI, so eval to trap. eval('use DBI;'); my $hasDbi = ($@ ? 0 : 1); BEGIN { if ($^O =~ /MSWin/i) { require Win32::File; import Win32::File; } } ############################################################################ my ($soupermailAdmin, $serverRoot, $mailprog, $mailhost, $pgpencrypt, $tempDir, $debug, $lout, $loutOpts, $pgpSet, $privateRoot, $forkable, $fhBug, $uploadTimeout, $ps2pdf, $fileLocking, $smtpPoolSize, $paranoid) = ""; ############################################################################ ############################################################################ # ---CHANGE ME FOR YOUR SITE--- # This is who to mail when soupermail goes wrong # PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE # PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE # PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE # CHANGE THIS!!! # I REALLY DON'T WANT TO GET ADMIN EMAILS ABOUT YOUR SITE!!!! ############################################################################ $soupermailAdmin = 'mde@michaeledens.com'; ############################################################################ # ---CHANGE ME FOR YOUR SITE--- # This is where the webserver's document tree starts # Do NOT include a trailing '/' character # # Some examples: # $serverRoot = 'c:/inetpub/wwwroot'; # Default NT/IIS setup # $serverRoot = $ENV{'DOCUMENT_ROOT'}; # May work on some webservers # $serverRoot = '/home/www/html'; # A typical UNIX setting ############################################################################ [COLOR=red]$serverRoot = $ENV{'DOCUMENT_ROOT'};[/COLOR] ############################################################################ # ---CHANGE ME FOR YOUR SITE--- # If you want to hide your config files from people browsing your site, # provide a path OUTSIDE your server root here. # # Some examples: # $privateRoot = "c:/inetpub/private"; ############################################################################ [COLOR=red]$privateRoot = $ENV{'DOCUMENT_ROOT'}/private';[/COLOR] ############################################################################ # Program locations. These will vary from site to site, so check that # they're there and setup as appropriate ############################################################################ ############################################################################ # ---CHANGE ME FOR YOUR SITE--- # To send outgoing mail, soupermail needs an SMTP mailserver to talk to. # If you don't know the address of a suitable mailserver, ask your ISP # or a system administrator. If you don't have a mailserver handy, you # can use sendmail. # If you indend to use the maillist features, I suggest you use a mailhost # since it is probably faster. # # Some examples: # $mailhost = 'localhost'; # Local SMTP server for NT # $mailprog = ''; # No mail program for NT # # $mailhost = ''; # No SMTP host for UNIX # $mailprog = '/usr/lib/sendmail'; # Local sendmail for UNIX ############################################################################ $mailhost = 'mail.michaeledens.com'; [COLOR=red]$mailprog = '/usr/sbin/sendmail';[/COLOR] Quote
TCH-Don Posted April 17, 2004 Posted April 17, 2004 (edited) After a quick look, try $serverRoot = '/home/yourcpanelusername/html'; $privateRoot is for a folder that you create above your html folder to store config files. so create a folder named private in your root folder (above the html) with an ftp program or filemanager, ant then $privateRoot =' /home/yourcpanelusername/private'; $mailprog = '/usr/sbin/sendmail'; is correct. However you may want to also look at some php programs to sendmail, as they may be easier to use. Edited April 17, 2004 by TCH-Don Quote
mdedens Posted April 18, 2004 Author Posted April 18, 2004 Hey Don! Thanks for the tips! Do you or anybody else know of some php form programs that allow attachments? I didn't know if that was possible with php form scripts. I was hoping to allow people to upload and send a small jpg to me in the form i have them fill out. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.