Page 1 of 1

Subscribing

PostPosted: Mon Nov 27, 2006 11:48 pm
by SnaXXy
Hi,

I have set everything up as stated in the readme. When I enter my own email address to test the subscribe and click submit, I get the following error:

"Can't open /usr/sbin/sendmail"

My host tells me that to use send mail, I need to change:

>> If the script has ( for example ):
>> $mailprog = "/usr/sbin/sendmail";

>> This would need to be replaced with:
>> $mailprog = "/usr/sbin/sendmail -faddress\@customers-domain-name";

However, when I go to admin and add the "-fsnaxxy@snaxxys-world.com" to the end of "/usr/sbin/sendmail", I get the error:
"Can't open /usr/sbin/sendmail -fsnaxxy@snaxxys-world.com!"

Any suggestions?

Thanks,
Gary

PostPosted: Tue Nov 28, 2006 2:43 am
by Admin-BS
Unless your host is running some kind of special sendmail clone, then the -f command is repetitive and unnecessary. It is used to set the "FROM" field in the outgoing email, but this is set anyway within subscriber.cgi to whatever your admin address is. Really, if you specify 2 different addresses (one with -f and one within the admin screen), the address you give as your admin address will override the one you specified with -f.

I really don't know why sendmail doesn't seem to be opening. If you're getting this while trying to confirm an address you might want to try this to see if you get any other useful info:

Code: Select all
1. Open subscriber.cgi and search for "sub confirm"
2. Within this subrountine find the line:
     open (MAIL, "|$mailprog -t") || die "Can't open $mailprog!\n";
3. Change this to:
     open (MAIL, "|$mailprog -t") || die "Can't open $mailprog: $!\n";


The addition of the $! in the string should return you a possible system error message that might be more useful.

PostPosted: Tue Nov 28, 2006 8:54 am
by SnaXXy
I am getting the error message when I am trying to subscribe my own email address to test the form at this page.

I put in my email address, click subscribe and then select submit. That's when I get the error message.

I have now changed the line in subscriber.cgi to what you suggested. Now I get the following error message: "Can't open /usr/sbin/sendmail! Bad file descriptor."

PostPosted: Tue Nov 28, 2006 1:47 pm
by Admin-BS
I'm honestly not sure why you're getting that error. It sounds like it's a bit more of a system error, but it's hard to tell.

You might try adding the -faddress command as your host said, and then removing the From: lines within mailing routines within the script. It's a long-shot, but I really don't know what else to suggest.

To do that just open up subscriber.cgi, search for "sub confirm", and remove the line:
print MAIL "From: $admin\n";

On the off change this works, just search through the script for lines like:
print MAIL "From:
...and delete them.

Sorry, but I really don't know what else to tell you. :(

PostPosted: Wed Nov 29, 2006 1:37 pm
by SnaXXy
I found out why it's not working. lol My site is hosted on a Windows server, and they say SENDMAIL can't be used on it. :-(

Thanks for your help.