I couldn't decide which forum to put this into, so please forgive me if it should've been put into a different, more appropriate one.
I have inherited a cgi script that mails a question and user info to one of our librarians here where I work. The problem is that half the time the message body is in an attachment instead of an "inline" regular email.
I don't know where this setting (attached or inline) is controlled and I don't know why it isn't the same every time. The cgi program mails via the system mail program, mail, which is actually a link to the "improved" linux nail program. I looked at the man page for nail and couldn't find anything that would control this. My MTA is Sendmail and I couldn't find anything in the config to control this either. The email client the librarian is using is Novell Groupwise WebAccess (a browser/webmail interface like hotmail). I can't imagine it would be controlled with that.
I made myself a test cgi script to play around with this. To start with, I made it email exactly
the same way as the other script and to the same address. For some reason, my test script will email inline every
I even put the test script in the same directory and gave it the same ownership and permissions as the other script, but I still can't get the other script to email inline every time!
The code (emailing part) is basically as follows:
$mailprog = "/usr/bin/mail -r $emailaddress -s Question";
$recipient = 'email@example.com'
open (MAIL, "|$mailprog $recipient") || die "Can't open $mailprog!\n";
print MAIL "Some message text\n\n";