Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.9k stars 540 forks source link

Mail::Sender dies prematurely #5021

Closed p5pRT closed 20 years ago

p5pRT commented 22 years ago

Migrated from rt.perl.org#8507 (status was 'resolved')

Searchable as RT8507$

p5pRT commented 22 years ago

From njancesk@summithq.com

Created by njancesk@deliv1.summithq.com

When using Mail​::Sender if I do not supply a value to 'to' in OpenMultipart the module dies prematurely without a descriptive error.

It should be able to handle sending an e-mail with no 'to' address\, as long as there is a cc or bcc.

here is a snip of code I used to get it to die​: note​: the $FORM{'to'} = "";

use Mail​::Sender; ref($sender = new Mail​::Sender   {smtp => 'mailhost.summithq.com'}) || die "$sender -- $Mail​::Sender​::Error\n";

$sender->OpenMultipart({from => $FORM{'from'}\, to=> $FORM{'to'}\, cc => $FORM{'cc'}\,   subject => $FORM{'subject'} } ) || die "2 $Mail​::Sender​::Error\n";

$sender->Body; ## dies here when to is empty

$sender->Send("$FORM{'mess'}");

  $sender->SendFile({   ctype => "$app/$type"\,   encoding => 'Base64'\,   file => "$file"   }) || die "3 $Mail​::Sender​::Error\n"; $sender->Close() || die "4 $Mail​::Sender​::Error\n";

Perl Info ``` Flags: category=utilities severity=medium Site configuration information for perl v5.6.1: Configured by njancesk at Wed Jan 9 17:48:48 EST 2002. Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=solaris, osvers=2.6, archname=sun4-solaris uname='sunos deliv1 5.6 generic_105181-19 sun4u sparc sunw,ultra-80 ' config_args='-Dprefix=/u/deliv/perl/perl-5.6.1-unix' hint=previous, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cc', ccflags ='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='cc', ldflags =' ' libpth=/usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-KPIC', lddlflags='-G' Locally applied patches: @INC for perl v5.6.1: /u/njancesk/perllib /u/deliv/perl-5.6.1-unix/lib/perl5/5.6.1/sun4-solaris /u/deliv/perl-5.6.1-unix/lib/perl5/5.6.1 /u/deliv/perl-5.6.1-unix/lib/perl5/site_perl/5.6.1/sun4-solaris /u/deliv/perl-5.6.1-unix/lib/perl5/site_perl/5.6.1 /u/deliv/perl-5.6.1-unix/lib/perl5/site_perl . Environment for perl v5.6.1: HOME=/u/njancesk LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH=/usr/openwin/lib:/usr/dt/lib:/apps/pkgs/sybase/OCS-12_0/lib:/apps/pkgs/oracle/lib:/apps/pkgs/orbix/lib LOGDIR (unset) PATH=/u/deliv/bin:/apps/bin:/apps/utils/bin:/global/utils/bin:/bin:/usr/bin:/usr/bin/X11:/u/njancesk/script:/u/njancesk/bin:/u/njancesk:/u/njancesk/progs/BerkeleyDB.3.2/bin:/u/njancesk/progs/mysql/bin:/u/xvillanu/bin:/u/njancesk/bin:/apps/utils/bin:/bin:/usr/bin:/usr/bin/X11:/global/utils/bin:/apps/bin:.:/usr/openwin/bin:/usr/ccs/bin:/usr/ucb:/usr/sbin:/apps/utils/dbbin:/apps/utils/dt/bin:/usr/dt/bin:/apps/bin:/usr/bin:/bin:/apps/pkgs/InstallShield-4.01:/u/deliv/bin:/apps/pkgs/flexlm-6.0/flexlm/v6.0/sun4_u5:/u/njancesk/script:/u/njancesk/bin PERL5LIB=/u/njancesk/perllib PERL_BADLANG (unset) SHELL=/bin/ksh ```
p5pRT commented 22 years ago

From @schwern

On Tue\, Feb 12\, 2002 at 05​:23​:05PM -0500\, Nikola Janceski wrote​:

This is a bug report for perl from njancesk@​deliv1.summithq.com\, generated with the help of perlbug 1.33 running under perl v5.6.1.

----------------------------------------------------------------- [Please enter your report here] When using Mail​::Sender if I do not supply a value to 'to' in OpenMultipart the module dies prematurely without a descriptive error. \

perlbug is indented to report bugs in the perl core\, not CPAN modules. As the author of Mail​::Sender likely won't see this message\, I've taken the liberty of forwarding your report onto him (Jan Krynicky \Jenda@​Krynicky\.cz).

In the future\, consider either sending mail to the author or use the new CPAN bug tracking system at rt.cpan.org.

--

Michael G. Schwern \schwern@​pobox\.com http​://www.pobox.com/~schwern/ Perl Quality Assurance \perl\-qa@​perl\.org Kwalitee Is Job One The drill instructors Have their pots of paste in hand Now the ass games start   -- ignatz

p5pRT commented 22 years ago

From @schwern

This report is about the non-core Mail​::Sender module. It has been forwarded to the author.

--

Michael G. Schwern \schwern@​pobox\.com http​://www.pobox.com/~schwern/ Perl Quality Assurance \perl\-qa@​perl\.org Kwalitee Is Job One "You killed my fish?" "Why does that pickle you?"   http​://sluggy.com/d/010204.html