Re: Undefined subroutine main::sendmail

2004-03-04 Thread Sherm Pendley
On Mar 4, 2004, at 12:36 AM, Baiss Eric Magnusson wrote:

I looked into the file /Library/Perl/Sendmail.pm
Is that really where you found it? If so, it's not installed correctly. 
It should be in /Library/Perl/Mail/ - on Panther, 
/Library/Perl/5.8.1/Mail/.

You *did* install it according to the directions, right? The directions 
are found in 'perldoc perlmodinstall' - as far as these directions are 
concerned, you're using a UNIX machine. The Mac directions are for 
MacPerl running on classic MacOS, not for Mac OS X.

The Sendmail I am using is http://alma.ch/perl/mail.htm and is on 
CPAN.
As I said before - the module that's listed at that URL, and listed on 
CPAN, is not named just Sendmail - it's name is Mail::Sendmail.

From your first message:

because this is the line that fails:

	$err = Error sending mail: $Mail::SendMail::error unless 
sendmail(%mail);
The above will fail because you're referring to $Mail::SendMail::error, 
and there is no such module and no such variable. As I said before, 
case is important. The module, and the package it's in, is called 
Mail::Sendmail - not Mail::SendMail.

Can I check these Perl scripts on my client machine ( i.e. no Apache 
installed)
Why is there no Apache installed? Did you remove it from your machine? 
If not, it's there - every OS X includes it. Just go to the System 
Preferences, and under the Sharing pane, enable Web Sharing. (Personal 
Web Sharing on Panther).

It's also useful to open /var/log/httpd/error_log in the Console.app - 
any error messages produced by your CGI script are logged there.

So far, I get the same error on the client machine as I get from the 
server.
It would be helpful if you'd include the error message. Don't try to 
re-type it, or any code - copy and paste, to reduce the chance of 
typos.

It would also be helpful reduce the problem to the smallest possible 
program that shows the error, and post that. For example, try running 
just the example given in 'perldoc Mail::Sendmail' from a command line, 
and see if that produces an error. If it does, post the test script and 
error message here.

If the sample script doesn't produce an error, then you know that the 
module is installed and working correctly. In that case, you need to 
find where your script does something different from the sample.

sherm--


installing PerlMagick

2004-03-04 Thread Dan Schroeder
I'm having trouble installing PerlMagick--hope someone can help.  
Details are below.  I should confess that I'm new to installing unix 
software so I'm probably overlooking something completely obvious.

Running OSX 10.3.2.
Perl 5.8.3 is installed in /usr/local, overriding Apple's default Perl.
ImageMagick 5.5.6 is installed (from source) via fink in /sw, and works 
from the command line.
Downloaded ImageMagick 5.5.6 manually from their web site, just to get 
PerlMagick, then edited Makefile.PL to add the /sw directories:

   'INC'	= '-I../ -I.. -I/sw/include/freetype2 -D_FILE_OFFSET_BITS=64 
-D_REENTRANT -I/usr/X11R6/include -I/sw/include/libxml2 
-I/sw/include',

   'LIBS'	= ['-L/usr/X11R6/lib -L/sw/lib  -lMagick -llcms -ltiff 
-lfreetype -ljasper -ljpeg -lpng -lXext -lSM -lICE -lX11 -lbz2 -lxml2 
-lz -lpthread -lm -ldpstk'],
Then tried to build PerlMagick as follows:

WS0010062749:~/downloads/ImageMagick-5.5.6/PerlMagick dschroeder$ perl 
Makefile.PL
Note (probably harmless): No library found for -ljasper
Writing Makefile for Image::Magick
WS0010062749:~/downloads/ImageMagick-5.5.6/PerlMagick dschroeder$ make
cc -c  -I../ -I.. -I/sw/include/freetype2 -D_FILE_OFFSET_BITS=64 
-D_REENTRANT -I/usr/X11R6/include -I/sw/include/libxml2 -I/sw/include 
-pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing 
-Os   -DVERSION=\5.56\ -DXS_VERSION=\5.56\  
-I/usr/local/lib/perl5/5.8.3/darwin-2level/CORE  -DHAVE_CONFIG_H 
Magick.c
Running Mkbootstrap for Image::Magick ()
chmod 644 Magick.bs
rm -f blib/arch/auto/Image/Magick/Magick.bundle
LD_RUN_PATH=/sw/lib:/usr/X11R6/lib:/usr/lib env 
MACOSX_DEPLOYMENT_TARGET=10.3 cc  -bundle -undefined dynamic_lookup 
Magick.o  -o blib/arch/auto/Image/Magick/Magick.bundle   
-L/usr/X11R6/lib -L/sw/lib -lMagick -llcms -ltiff -lfreetype -ljpeg 
-lpng -lXext -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm -ldpstk
chmod 755 blib/arch/auto/Image/Magick/Magick.bundle
cp Magick.bs blib/arch/auto/Image/Magick/Magick.bs
chmod 644 blib/arch/auto/Image/Magick/Magick.bs
Manifying blib/man3/Image::Magick.3
/usr/local/bin/perl -Iblib/arch -Iblib/lib Makefile2.PL Makefile2
Writing Makefile for Image::Magick
/usr/local/bin/perl -Iblib/arch -Iblib/lib MakefileOld.PL 
MakefileOld
Note (probably harmless): No library found for -lMagick
Note (probably harmless): No library found for -llcms
Writing Makefile for Image::Magick
WS0010062749:~/downloads/ImageMagick-5.5.6/PerlMagick dschroeder$ sudo 
make install
Password:
cc -c  -I../ -I.. -I/usr/include/freetype2 -D_FILE_OFFSET_BITS=64 
-D_REENTRANT -I/usr/X11R6/include -I/usr/include/libxml2 -pipe 
-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Os   
-DVERSION=\5.56\ -DXS_VERSION=\5.56\  
-I/usr/local/lib/perl5/5.8.3/darwin-2level/CORE  -DHAVE_CONFIG_H 
Magick.c
In file included from Magick.xs:81:
../magick/api.h:15:36: magick/magick_config.h: No such file or 
directory
../magick/api.h:27:19: types.h: No such file or directory
make: *** [Magick.o] Error 1
Note the error messages at the end.  So:  What am I doing wrong?

Thanks a lot,

Dan




Re: sending to Mail.app - pkg installer error

2004-03-04 Thread Joseph Alotta
Greetings,

One of the people on this list, Wilfredo Sánchez, recommended that I  
use the mailapp-utitities.  This seems exactly what I am looking for.

They are four small programs and they are put together in a package  
installer bundle.  Only thing is that the package installer won't  
install. Here is the error message, from Package Installer:  Missing or  
Old Bill of Materials.

I know that this is not the normal thing for this list, but I know that  
it seems like it would be easy to fix and that the person who is  
supposed to be maintaining it is not to be found.

Thank you,

Joe.

On Mar 2, 2004, at 12:17 AM, Wilfredo Sánchez wrote:

ftp://next-ftp.peak.org/next/apps/devtools/macosx/server/Applications/ 
Mail/CLI/mailapp-utilities/

-wsv

On Mar 1, 2004, at 8:06 PM, Joseph Alotta wrote:

Greetings,

I have some perl programs and I would like to send the output of them  
to the Mail.app so they look like regular email messages. I couldn't  
get any of the unix mail stuff to work, probably because I do not  
have sendmail running for security concerns reasons.  (I dial up a  
few times a day).

I figured out where Mail.app was storing it's text and I was able to  
append stuff on the end of the file and that worked only half and  
half.  Apparently, the indexed get messed up and Mail.app crashes now  
and then. Then I created a new mailbox and append email to that, and  
that solves the crashing part, but the messages aren't flagged as  
new, and I sometimes miss them.

I can think of two different ways to handle this, 1) using Mac::Glue  
to cause Mail.app to send a message out to myself, or 2) append to  
the end of the inbox file and then use Mac:Glue to update the
indexes.

Does anyone have any ideas on this?


Joe Alotta



Re: sending to Mail.app - pkg installer error

2004-03-04 Thread Sherm Pendley
On Mar 4, 2004, at 12:10 PM, Joseph Alotta wrote:

They are four small programs and they are put together in a package 
installer bundle.  Only thing is that the package installer won't 
install. Here is the error message, from Package Installer:  Missing 
or Old Bill of Materials.
Have you tried looking in the package with Pacifist?

sherm--



Re: Undefined subroutine main::sendmail

2004-03-04 Thread John Delacour
(BAt 4:25 am -0500 4/3/04, Sherm Pendley wrote:
(B
(BOn Mar 4, 2004, at 12:36 AM, Baiss Eric Magnusson wrote:
(B
(BI looked into the file /Library/Perl/Sendmail.pm
(B
(BIs that really where you found it? If so, it's not installed 
(Bcorrectly. It should be in /Library/Perl/Mail/ - on Panther, 
(B/Library/Perl/5.8.1/Mail/.
(B
(BI can't talk about this module because I don't use it, but the 
(BSendMail.pm I do use, and which I presumed was the commonly used one, 
(Bis that from
(B
(Bhttp://www.tneoh.zoneit.com/perl/SendMail/
(B
(B
(BI append, in case it's of any use, a working example of a script that 
(Buses this module to send mail through sendmail or postfix (it makes 
(Bno difference).  If you try it, please change the value of @to.
(B
(BJD
(B
(B
(B
(B#!/usr/bin/perl
(Buse SendMail;
(B$charset = "iso-2022-jp";
(B
(B%headers = (
(B
(B'MIME-version' = '1.0',
(B'Content-Type'  = "text/html;charset=$charset",
(B
(B);
(B
(B$from = 'John Delacour [EMAIL PROTECTED]' ;
(B@to = split $/, 'John [EMAIL PROTECTED]
(BJD [EMAIL PROTECTED]' ;
(B$subject = "Test" ;
(B
(B$body = q|
(Bhtmlbody
(B
(Bpre
$BI4I_$d(B
(B
$B8E$-8.C<$N(B
$B$7$N$V$K$b(B
$B$J$[$"$^$j$"$k(B
$B$`$+$7$J$j$1$j(B
(B/pre
(B/body/html
(B|;
(B
(B$sm = new SendMail();
(B$sm-setDebug($sm-ON);
(B
(Bfor $key (keys %headers) {
(B	$sm-setMailHeader($key, $headers{$key});
(B}
(B$sm-From($from) ;
(B$sm-Subject($subject);
(B$sm-To(@to);
(B$sm-setMailBody($body);
(B
(Bif ($sm-sendMail() != 0) {print $sm-{'error'}."\n" ; exit -1; }
(Bprint "Done\n\n" ; exit 0;

Re: sending to Mail.app - pkg installer error

2004-03-04 Thread Joseph Alotta
On Mar 4, 2004, at 11:46 AM, Sherm Pendley wrote:

On Mar 4, 2004, at 12:10 PM, Joseph Alotta wrote:

They are four small programs and they are put together in a package 
installer bundle.  Only thing is that the package installer won't 
install. Here is the error message, from Package Installer:  Missing 
or Old Bill of Materials.
Have you tried looking in the package with Pacifist?

sherm--

Sherm,

I was able to look in the package a little using cds and cats.  I am 
not familiar with Pacifist.
Just so you know, I am not a major hacker, most of my understanding is 
application-oriented, not
system-oriented.

Joe.



Re: Undefined subroutine main::sendmail

2004-03-04 Thread Sherm Pendley
On Mar 4, 2004, at 4:17 PM, John Delacour wrote:

the SendMail.pm I do use, and which I presumed was the commonly used 
one, is that from
It's not on CPAN, and not mentioned in any of the faqs or docs I'm 
aware of. I think it'd be a bit of a stretch to assume it's in 
widespread use.

At any rate, the OP is almost certainly using Mail::Sendmail. He's 
calling a non-oop sendmail() function, passing it a %mail hash, and 
checking for an error in $Mail::Sendmail::error - it's more or less 
straight out of the Mail::Sendmail docs.

If he really is trying to use a Mail::Sendmail that's been drag-n-drop 
copied instead of correctly installed, he'll see *exactly* the problem 
he's mentioning. The rough equivalent to use Sendmail; is this:

BEGIN {
require Sendmail.pm;
Sendmail::import();
}
If he mistakenly drag-n-dropped the Sendmail.pm file into the wrong 
folder, and then tried to compensate for that by adjusting the use 
statement, he'll get exactly the error he's reported. The use will find 
the file and require() it, but because the code in the file is actually 
in the Mail::Sendmail package, the call to Sendmail::import() fails, so 
sendmail() isn't imported into main.

Another reason I believe it's a drag-n-drop error is that, just last 
week, the same person had the same problem, although with different 
symptoms - he had drag-n-dropped a .pm file for a module that has some 
compiled C functions, and was wondering why he was getting errors about 
the .dylib not being found.

sherm--



Re: Undefined subroutine main::sendmail

2004-03-04 Thread Baiss Eric Magnusson
I went back and removed files and then tried a clean install of 
Mail-Sendmail-0.78.tar.

I had tried different versions of SendMail and had made many erroneous 
assumptions about compatibility of the Sendmail packages, including the 
one John mentioned at  http://www.tneoh.zoneit.com/perl/SendMail/.

I carefully set case awareness between Sendmail and cwdmail.cgi. My 
original install notes sent to me by an anonymous friend had me doing 
a drag-n-drop install. So I believe that Sherm correctly identified one 
(of the many) problems, being the drag-n-drop.

Well, I actually did get the mail sent from the HTML form on page
http://www.cascadewebdesign.com/contact.html
as desired.
The HTML page, though, is then filled with errors, so the form 
submitter is not aware of the success. Try the page if you wish to see 
the errors. Here's one of 5.
*
Can't locate loadable object for module MIME::Base64 in @INC (@INC 
contains: /System/Library/Perl/darwin /System/Library/Perl 
/Library/Perl/darwin /Library/Perl /Library/Perl 
/Network/Library/Perl/darwin /Network/Library/Perl 
/Network/Library/Perl .) at /Library/Perl/MIME/QuotedPrint.pm line 14
*

I do have some version of Base64.pm and QuotedPrint.pm in 
/Library/Perl/MIME/

More notes: my server is using Jaguar so the path is 
/Library/Perl/Mail/, my client is Panther and I will re-try there 
with the install going into /Library/Perl/5.8.1/Mail. Note: you must 
log in as root to do the Mail-Sendmail-0.78.tar install.

The errors most certainly relate to the way Base64 and QuotedPrint were 
installed, now if I can just find the versions of those modules to go 
with my current version of Sendmail.

Thanks for all the help,
Baiss
On Mar 4, 2004, at 3:25 PM, Sherm Pendley wrote:

On Mar 4, 2004, at 4:17 PM, John Delacour wrote:

the SendMail.pm I do use, and which I presumed was the commonly used 
one, is that from
It's not on CPAN, and not mentioned in any of the faqs or docs I'm 
aware of. I think it'd be a bit of a stretch to assume it's in 
widespread use.

At any rate, the OP is almost certainly using Mail::Sendmail. He's 
calling a non-oop sendmail() function, passing it a %mail hash, and 
checking for an error in $Mail::Sendmail::error - it's more or less 
straight out of the Mail::Sendmail docs.

If he really is trying to use a Mail::Sendmail that's been drag-n-drop 
copied instead of correctly installed, he'll see *exactly* the problem 
he's mentioning. The rough equivalent to use Sendmail; is this:

BEGIN {
require Sendmail.pm;
Sendmail::import();
}
If he mistakenly drag-n-dropped the Sendmail.pm file into the wrong 
folder, and then tried to compensate for that by adjusting the use 
statement, he'll get exactly the error he's reported. The use will 
find the file and require() it, but because the code in the file is 
actually in the Mail::Sendmail package, the call to Sendmail::import() 
fails, so sendmail() isn't imported into main.

Another reason I believe it's a drag-n-drop error is that, just last 
week, the same person had the same problem, although with different 
symptoms - he had drag-n-dropped a .pm file for a module that has some 
compiled C functions, and was wondering why he was getting errors 
about the .dylib not being found.

sherm--



Baiss Eric Magnusson
http://www.Track-Your-Finances.com
http://www.CascadeWebDesign.com


Re: Undefined subroutine main::sendmail

2004-03-04 Thread Bruce Van Allen
On 3/4/04 Baiss Eric Magnusson wrote:
I went back and removed files and then tried a clean install of 
Mail-Sendmail-0.78.tar.

[snipped description of errors]

The errors most certainly relate to the way Base64 and QuotedPrint were 
installed, now if I can just find the versions of those modules to go 
with my current version of Sendmail.

This is where you missed a key bit of advice -- have the CPAN do the
installation for you.

Many Perl modules have dependencies on other modules, which themselves
may have dependencies.

In your Terminal, type 'cpan' without the quotes. You'll get the CPAN
shell, and the first time you'll be taken through its configuration. On
Panther/darwin, you can safely accept the config defaults (when picking
archive sites, stick to your own continent).

At the cpan shell prompt, type 'h' (no quotes) to see the available
commands.

Here's what will work most times:

1. at the cpan shell prompt, type 'i' and the name of the module as a
regular expression, and hit return (you'll get something like what
follows here:

cpan i /Mail::Sendmail/
Module  Mail::Sendmail (M/MI/MIVKOVIC/Mail-Sendmail-0.79.tar.gz)
Module  Tindermail::Sendmail
(Z/ZL/ZLIPTON/Devel-Tinderclient-1.2.zip)
2 items found

OK, the first one looks like what we want. For more info, search on
/Mail-Sendmail/ , which will match the filename of the archive.

cpan i /Mail-Sendmail/
Distribution id = M/MI/MIVKOVIC/Mail-Sendmail-0.79.tar.gz
CPAN_USERID  MIVKOVIC (Milivoj Ivkovic [EMAIL PROTECTED])
CALLED_FOR   M/MI/MIVKOVIC/Mail-Sendmail-0.79.tar.gz
CONTAINSMODS Mail::Sendmail
MD5_STATUS   OK
archived tar
build_dir/Users/bva/.cpan/build/Mail-Sendmail-0.79
incommandcolor 0
install  YES
localfile
/Users/bva/.cpan/sources/authors/id/M/MI/MIVKOVIC/Mail-Sendmail-0.79.tar
.gz
make YES
make_testYES
prereq_pm
prereq_pm_detected 1
unwrappedYES
writemakefile YES


Yes, that's it. Now, copy the Distribution id, type 'install ' at the
cpan prompt, paste in the id, and press return:

cpan install  M/MI/MIVKOVIC/Mail-Sendmail-0.79.tar.gz

CPAN will do the necessary prerequisite (dependency) checks, downloads,
unpacks, etc., for you. Just watch it go by. Then, when everything it
needs is there, it will make, test, and install the module.

If something isn't right, test, make, make test, or make install will
fail and let you know what happened. Send THAT to this list for advice.
At that point you and we will have a much better of solving any
problems.

I just did it on Panther 10.3.2. I allowed Mail::Sendmail to install
without changing the test script, test.pl.

Copying the sample in the README (also at
http://www.cpan.org/modules/by-module/Mail/Mail-Sendmail-0.79.readme),

I wrote this script (substitute your own to, from, and smtp server.):

#!/usr/bin/perl -w

use strict;

use Mail::Sendmail;

my %mail = (
To  = '[EMAIL PROTECTED]',
From= '[EMAIL PROTECTED]',
Message = This is a very short message,
smtp= 'my.mail-smtp.server.com',
   );

sendmail(%mail) or die $Mail::Sendmail::error;

print OK. Log says:\n, $Mail::Sendmail::log;

 __END__

Worked out of the box.

##
OK. Log says:
Mail::Sendmail v. 0.79 - Thu Mar  4 19:25:09 2004
Date: Thu, 4 Mar 2004 19:25:09 -0800
Server: my.mail-smtp.server.com Port: 25
From: [EMAIL PROTECTED]
Subject: Sendmail Test
To: [EMAIL PROTECTED]

Result: 250 2.0.0 i253PGnJ084630 Message accepted for delivery
##

And I received the message a moment later.

Give it a try. 

- Bruce

__bruce__van_allen__santa_cruz__ca__


Re: Undefined subroutine main::sendmail

2004-03-04 Thread Bruce Van Allen
On 3/4/04 Bruce Van Allen wrote:
In your Terminal, type 'cpan' without the quotes. You'll get the CPAN
shell, and the first time you'll be taken through its configuration. On

Sorry, less grief if you type 'sudo cpan' at your Terminal/command line
prompt.

Use your administrative password.

- Bruce

__bruce__van_allen__santa_cruz__ca__