> [EMAIL PROTECTED] ./summer.pl
> Bareword found where operator expected at ./summer.pl line 78, near "print
> SENDMAIL "TO"
> (Might be a runaway multi-line "" string starting on line 77)
> (Do you need to predeclare print?)
> syntax error at ./summer.pl line 78, near "print SENDMAIL "TO"
> Backslash found where operator expected at ./summer.pl line 78, near
> "$rpcAdmList \"
> (Missing operator before \?)
Sending messages containing quotes itself as well might result in these errors. I know
there are possibilities to fix it.
You could do a regex in advance of :
$mystring =~ s/"/\"/g;
and then
print SENDMAIL "$mystring";
Of course there are multiple errors, and this is not tested yet, but could be your
solution.
I solved this using attached korn-shell script.
Regs David
*********************************************************************
This message is intended only for the person or entity to
which it is addressed and may contain confidential and/or
privileged information, the disclosure of which is prohibited.
If you are not the intended recipient you may not read,
use, disseminate or copy the information transmitted. If
you have received this message in error, please contact
the sender and delete the material from any computer.
Dit bericht is uitsluitend bestemd voor de (rechts)persoon
aan welke het is gericht. Het kan vertrouwelijke of
alleen voor deze bestemde informatie bevatten, die niet
mag worden geopenbaard. Als dit bericht niet voor u
bestemd is, mag u de ontvangen informatie niet lezen,
gebruiken, verspreiden of kopieren. Als u dit bericht
abusievelijk hebt ontvangen, gelieve u het te deleten en
contact op te nemen met de afzender.
********************************************************************
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
--- Begin Message ---
#!/bin/ksh
# We have to invoke a mailer that has no escape possibilities...
#
# The only one I know of would be sendmail, but this is very ugly
# to invoke directly because we have no control of To: and
# Subject: lines...
#
# This wrapper writes some of the Header-Fields before forwarding the
# mail itself in the body
#
# usage: start-mail mailaddr subject
# you might want to change the following line to set a sepcific from: address
# example: sender='[EMAIL PROTECTED] (Logsurfer Account)'
#sender=`/usr/bin/id|/usr/bin/sed 's/.*(\(.*\)) .*/\1/'`
sender='root@'`/usr/bin/hostname`
# it's a bad idea to use temporary files with predictable names that are
# located in a world-writable /tmp dir because other local users may create
# sym-links pointing to another file...
#
# better use a tmp-dir that is only accessible by the logsurfer user
# change the following line!
# example: TMP=/home/logsurfer
TMP=/tmp
recepient="$1"
subject="$2"
message="$3"
if [ $# -eq 0 ]; then
echo 'usage: start-mail mailaddr subject' 1>&2
exit 1
fi
/bin/rm -f $TMP/start-mail.$$
echo "From: $sender" > $TMP/start-mail.$$
echo "To: $recepient" | /usr/bin/tr -cd '[\040-\176]' >> $TMP/start-mail.$$
echo "" >> $TMP/start-mail.$$
if [ $# -gt 1 ]; then
shift
echo "Subject: $subject" | /usr/bin/tr -cd '[\040-\176]' >> $TMP/start-mail.$$
echo "" >> $TMP/start-mail.$$
else
echo "Subject: (no subject given - logsurfer output)" >> $TMP/start-mail.$$
fi
echo "" >> $TMP/start-mail.$$
echo "$message" | /usr/bin/tr -cd '[\040-\176]' >>/$TMP/start-mail.$$
echo "\n." >>/$TMP/start-mail.$$
cat $TMP/start-mail.$$ - | /usr/lib/sendmail -odq -t
/bin/rm -f $TMP/start-mail.$$
--- End Message ---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]