View Full Version : What is the $mailprog ?
Allegro
12-06-2002, 08:22 PM
Which $mailprog should i use?
i've seen 2 different ones
a) $mailprog = '/usr/lib/sendmail';
b) $mailprog = '/usr/sbin/sendmail';
(btw, neither work)
i can't get my script to work.
don5408
12-06-2002, 10:18 PM
"Which $mailprog should i use?"
Hi. The path to sendmail is /usr/sbin/sendmail. If you're reffering to Matt Wright's FormMail script note that the $mailprog line I'm using in a FormMail script which works on my account is:
$mailprog = '/usr/sbin/sendmail -i -t';
Make sure that you are using the latest version of FormMail (v1.92).
Don
HRGraham
12-06-2002, 10:18 PM
You can use either of those sendmail paths. The actual sendmail script is located at /usr/sbin/sendmail. The /usr/lib/sendmail path is just a symbolic link.
Does your script not execute or does the mail never get delivered?
-Graham
HRGraham
12-06-2002, 10:19 PM
Looks like you beat me Don.
don5408
12-06-2002, 11:48 PM
"Looks like you beat me Don"
LOL, maybe by a nose...'twas a 'photo finish' (hold all bets pending a final determination by the judges ;-)
Don
HRGraham
12-06-2002, 11:52 PM
haha
Allegro
12-07-2002, 01:40 AM
Well, My html test page i have created (only two fields, user email and name) seems to sent to /cgi-bin/FormMail.pl but then it comes up as "The page cannot be displayed"
yes the .pl is set to 755
don5408
12-07-2002, 02:15 AM
"My html test page i have created (only two fields, user email and name) seems to sent to /cgi-bin/FormMail.pl but then it comes up as "The page cannot be displayed""
Hi. If possible it might help if you could either post a link to the test page in question or post the form code here.
Don
Allegro
12-07-2002, 02:48 AM
http://www.allegrowestdance.com/test.html
sorry, should of added it in last post
don5408
12-07-2002, 03:30 AM
"http://www.allegrowestdance.com/test.html"
OK, well when I tried to use the form rather than getting a "The page cannot be displayed" error I got a 500 error (Internal Server Error) which indicates a problem with the script itself.
Exactly how did you upload the FormMail.pl file, and are you sure that the file was uploaded in ASCII mode? Inadvertantly uploading a Perl script in binary mode can hose the script's formatting and cause server errors. Try this:
Delete the existing copy of FormMail.pl from your cgi-bin folder and start off from scratch with a new/fresh copy of FormMail v1.92. Open the FormMail.pl file in NotePad (plain ol' Windows NotePad rather than another text editor or word processor) changing only the @referers and @recipients variables exactly as follows:
$mailprog = '/usr/sbin/sendmail -i -t';
@referers = ('allegrowestdance.com','66.192.47.52');
@recipients = ('^webmaster\@allegrowestdance\.com');
Save the file and upload it. If you upload using an FTP client (recommended) such as WS_FTP LE make sure that the file is uploaded in ASCII mode. Try your test form again, it *should* work.
Best o' luck, keep us posted!
Don
Allegro
12-07-2002, 04:26 AM
Ah Ha! It's been a while since i did scripting, i totally forgot about ASCII uploading and that was my problem!
Thank you for the quick and helpful response!
don5408
12-07-2002, 05:30 AM
"i totally forgot about ASCII uploading and that was my problem! Thank you for the quick and helpful response!"
You're quite welcome, happy to hear everything worked out!
Don
bbrown44601
04-25-2006, 09:31 PM
In my search for an answer, i came upon this chain of conversation and it's very close to what i need to have answered. I realize that this is like a four year old conversation, but the question i have is still very relevant.
Formmail.pl just plain doesn't generate the email.
I'm convinced that it's the reference in $mailprog that is at issue.
I could be wrong, but...
This code listed below is referenced in the chain below. I'm assuming that the /usr/sbin/sendmail -i -t is assuming that the formmail.pl exists on a unix server.
If formmail.pl exists on a windows server, what is the proper reference to $mailprog? I've tried many permutations and am currently at a total loss.
Things tried...
#$mailprog = '/usr/sbin/sendmail -i -t'; #
$mailprog = 'localhost';
# following lines test for above, the ip or email address of mail server #
#$mailprog = '205.178.146.50'; #
#$mailprog = 'smtp.bitcs.biz'; #
#$mailprog = 'smtp.localhost'; #
#$mailprog = 'SMTP:bitcs.biz'; #
Any help would be truly appreciated.
Bernie Brown
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.