Click to See Complete Forum and Search --> : nms formmail no longer works


bmartin
03-31-2009, 01:50 PM
I am NOT a programmer...
I am using nms form mail that worked fine using the SMTP local host. However our ISP provider changed their security settings and they tell me that I can no longer use "SMTP:loclahost". They gave me this path: /usr/sbin/sendmail

However, when I plug this ('/usr/sbin/sendmail -oi -t') into the $mailprog line I get the following error message:
Invalid at the top level of the document. Error processing resource 'http://www.worldharbors.com/cgi-bin/WHfmml.pl'. Line ...


This is the code:

#!/usr/bin/perl
#
# NMS FormMail Version 3.14c1
#

use strict;
use vars qw(
$DEBUGGING $emulate_matts_code $secure %more_config
$allow_empty_ref $max_recipients $mailprog @referers
@allow_mail_to @recipients %recipient_alias
@valid_ENV $date_fmt $style $send_confirmation_mail
$confirmation_text $locale $charset $no_content
$double_spacing $wrap_text $wrap_style $postmaster
$address_style
);
BEGIN
{
$DEBUGGING = 0;
$emulate_matts_code= 0;
$secure = 1;
$allow_empty_ref = 1;
$max_recipients = 1;
$mailprog = 'SMTP:localhost';
$postmaster = test@worldharbors.com';
@referers = qw(worldharbors.com);
@allow_mail_to = qw(test@worldharbors.com);
@recipients = ();
%recipient_alias = ();
@valid_ENV = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
$locale = '';
$charset = 'iso-8859-1';
$date_fmt = '%A, %B %d, %Y at %H:%M:%S';
$style = '0';
$no_content = 0;
$double_spacing = 1;
$wrap_text = 0;
$wrap_style = 1;
$address_style = 0;
$send_confirmation_mail = 0;
$confirmation_text = <<'END_OF_CONFIRMATION';

raz433
03-31-2009, 03:57 PM
OK, First off I am not a programmer either but I have just spent the last 12 hours trying to get nms formmail to work after I moved some sites to godaddy. I will post a few of the things I have found that worked for others and myself. Your milage may vary

Looking at your code there appears to be a ' left out before the postmaster address.

Also make sure that your ISP has the permissions for yout .pl file set to 0755 This was my issue all along. I was told godaddy permissions were already set correctly...I found out otherwise.

Also godaddy does not let you use cgi-bin you have to use just cgi

Here is my code that is working: Good luck

$DEBUGGING = 1;
$emulate_matts_code= 0;
$secure = 1;
$allow_empty_ref = 1;
$max_recipients = 5;
$mailprog = '/usr/sbin/sendmail -oi -t';
$postmaster = 'info@goldcastproducts.com';
@referers = qw(goldcastproducts.com 72.167.232.86 localhost);
@allow_mail_to = qw(info@goldcastproducts.com);
@recipients = ();
%recipient_alias = ();
@valid_ENV = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
$locale = '';
$charset = 'iso-8859-1';
$date_fmt = '%A, %B %d, %Y at %H:%M:%S';
$style = 'videorequest.css';
$no_content = 0;
$double_spacing = 1;
$wrap_text = 0;
$wrap_style = 1;
$address_style = 0;
$send_confirmation_mail = 0;
$confirmation_text = <<'END_OF_CONFIRMATION';
From: you@your.com
Subject: form submission

bmartin
03-31-2009, 05:02 PM
But I'm not on Linux and our ISP is telilng me to chnage it to 755 only if I'm on Linux...