Mail::Sender

2005-04-07 Thread Ravinder Arepally
 

All,

 

I am having problem when I use multiple users in to or cc list while
sending a email.

I am using Mail::Sender module. I have a list of email addresses in
$toList and I am just using that for to list.

I am not getting any email or error message. If I just use on email
address like [EMAIL PROTECTED] instead of $toList, it works fine.

I am not understanding problem here. Can anyone suggest what I am doing
wrong.

 

Thanks,

Ravi.

 

 

sub sendHTMLMail {

 

my $htmlfile = shift;

open IN, $htmlfile or die "Cannot open $htmlfile : $!\n";

my $subject = "$buildName:$options{'subjectprefix'}: ";

 

my $toList = "[EMAIL PROTECTED]; [EMAIL PROTECTED]";

 

print" tolist is $toList \n\n";

 

my $sender =

  new Mail::Sender { smtp => 'mail.ariba.com',

from => "$buildName<[EMAIL PROTECTED]>" };

$sender->Open(

{

to   => $toList,  -- Problem

cc   => $options{'email'},

subject  => "$subject",

    ctype=> "text/html",

encoding => "UTF-8"

}

  )

  or die $Mail::Sender::Error, "\n";

while () { $sender->SendEx($_) }

close IN;

$sender->Close();

 

}



Mail::Sender

2002-05-23 Thread gkhgkh

I receive the following error when using the 
Mail::Sender module.  I am running it on Redhat 7.2.

Any help in resolving this issue is appreciated.

Thanks

Use of uninitialized value in concatenation (.) or 
string at /usr/local/ActivePerl-
5.6/lib/site_perl/lib/5.6.1/Mail/Sender.pm Line 763, 
 line 1.  Server error: 501 Command "helo" 
requires and argument

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Mail::Sender

2007-01-17 Thread Brent Clark

To whom it may concern

I have a problem whereby on sending an email, my mailserver does not allow for 
ip, (needs to be wrapped in [] ).


220 mail.eccotours.co.za ESMTP Exim (Ecco Tours) 4.63 Wed, 17 Jan 2007 16:47:41 
+0200

<< EHLO 192.168.111.248

250-mail.eccotours.co.za Hello 192.168.111.248 [192.168.111.248]
250-SIZE 15728640
250-PIPELINING
250 HELP

<< MAIL FROM: <[EMAIL PROTECTED]>

250 OK

<< RCPT TO: <[EMAIL PROTECTED]>

550 "REJECTED - Bad HELO - IP address not allowed [192.168.111.248]"

<< quit



If there any possible to get Mail::Sender to do this.

You feedback, would greatfully be appreciated.

Kind Regards
Brent Clark


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Mail::Sender

2002-02-12 Thread Nikola Janceski

Okay I am at a loss here...

I am using Mail::Sender to generate e-mails from a cgi page.
I am successful with genereating it using a regular script run from a
command line.

But when I put the code into my cgi it gives me this stupid error, (I
upgraded the module to the latest).
The code is almost an exact copy of one of the examples in the
documentation. And funny how it dies in the module and not in my script.

Here is the code I am using:

[snip all the checking and crap]

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

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


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

foreach $file (split(/\s+/, $FORM{'files'})){
if ($file =~ /.*\.tar(\.Z)?$/i) { $type = "gzip"; $app =
"application";}
if ($file =~ /.*\.zip$/i) { $type = "zip"; $app = "application";}
if ($file =~ /.*\.html$/i) { $type = "html"; $app = "text";}
if ($file =~ /.*\.doc$/i) { $type = "word"; $app = "application";}
$sender->SendFile({
    ctype => "$app/$type",
encoding => 'Base64',
file => "$file"
}) || die "$Mail::Sender::Error\n";
}

$sender->Close() || die "$Mail::Sender::Error\n";

__END__

The ERROR I receive is:
can't use an undefined value as a symbol reference at
//perl-5.6.1-unix/lib/perl5/site_perl/5.6.1/mail/sender.pm line 1229.
Any clues as to what might be my problem?
$FORM contains true values foreach key or "";

here is the code from the module:

sub EndPart {
 my $self = shift;
# return unless $self->{part};
 my $s = $self->{'socket'};
 if ($self->{buffer}) {
  my $code = $self->{code};
  print $s (&$code($self->{buffer}));
  delete $self->{buffer};
 }
 print $s "\r\n--",$self->{'boundary'},"\r\n";  #  line 1229
 undef $self->{part};
 1;
}



ANY HELP IS MUCH APPRECIATED <8^s

Nikola Janceski
Summit Systems, Inc.
212-896-3400

To find out a girl's faults, praise her to her girl friends.
-- Benjamin Franklin




The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Mail::Sender

2002-03-13 Thread gkhgkh

I am using Mail::Sender on AIX 4.3.3 and encounter the 
following error when running a script.

Use of uninitialized value 
at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sender.pm 
line 944,  chunk 5.
Can't use an undefined value as filehandle reference 
at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sender.pm 
line 944,  chunk 5.

I have used this on other sysystem without any 
problems.  Does anyone know if there are any issues with 
Mail::Sender on AIX 4.3.3?

Thanks

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




using Mail::Sender

2004-11-20 Thread Mike Blezien
Hello,
we've been using the Mime::Lite module for sending email image attachments with 
great success in the past, but now need to use the Mail::Sender modules as it 
allows for SMTP w/authentication which the server requires to send emails on 
this particular application. Mime::Lite doesn't provide for SMTP w/authentication.

I was hoping someone maybe able to supply a simple code example using the 
Mail::Sender module for sending a message via SMTP w/authentication, a message 
body and attaching an image to the email. I've been reading through the examples 
on the CPAN site, but haven't quiet gotten it figured out yet. Any help would be 
much appreciated.

TIA
--
Mike(mickalo)Blezien
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



Re: Mail::Sender

2005-04-07 Thread Mike Blezien
Try seperating your $toList email addresses with a comma instead of the semi 
colon
Ravinder Arepally wrote:
 

All,
 

I am having problem when I use multiple users in to or cc list while
sending a email.
I am using Mail::Sender module. I have a list of email addresses in
$toList and I am just using that for to list.
I am not getting any email or error message. If I just use on email
address like [EMAIL PROTECTED] instead of $toList, it works fine.
I am not understanding problem here. Can anyone suggest what I am doing
wrong.
 

Thanks,
Ravi.
 

 

sub sendHTMLMail {
 

my $htmlfile = shift;
open IN, $htmlfile or die "Cannot open $htmlfile : $!\n";
my $subject = "$buildName:$options{'subjectprefix'}: ";
 

my $toList = "[EMAIL PROTECTED]; [EMAIL PROTECTED]";
 

print" tolist is $toList \n\n";
 

my $sender =
  new Mail::Sender { smtp => 'mail.ariba.com',
from => "$buildName<[EMAIL PROTECTED]>" };
$sender->Open(
{
to   => $toList,  -- Problem
cc   => $options{'email'},
subject  => "$subject",
ctype=> "text/html",
encoding => "UTF-8"
}
  )
  or die $Mail::Sender::Error, "\n";
while () { $sender->SendEx($_) }
close IN;
$sender->Close();
 

}


--
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://thunder-rain.com/
Tel: 1.712.395.0670
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



using Mail::Sender

2005-05-19 Thread Graeme McLaren
Hi all, I'm wanting to use the Mail::Sender module.  When sending emails 
I'll need to use an SMTP server.  On CPAN I found the following in the 
documentation, is this all I would need to send email?  What is the "auth" 
key for?  Surely all you need is a host, username and password?

if ($sender->MailMsg({
  smtp => 'mail.yourISP.com',
  from => '[EMAIL PROTECTED]',
  to =>'[EMAIL PROTECTED]',
  subject => 'this is a test',
  msg => "Hi Johnie.\nHow are you?"
  auth => 'NTLM',
  authid => 'jenda',
  authpwd => 'benda',
}) < 0) {
 die "$Mail::Sender::Error\n";
}
print "Mail sent OK."
Cheers,
G :)

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



Mail::Sender question

2002-11-19 Thread Goodman Kristi - kgoodm
I have the code (below) that works fine with the older version of
MAIL::SENDER (v0.7.06) but will not send with the new version of
MAIL::SENDER (v0.7.14.1) .  Any thoughts?




$sender = new Mail::Sender {smtp=> 'mail.conway.acxiom.com', from=>
$assigned . '@acxiom.com',to=> $dcarep . '@acxiom.com,' . $rep .
'@acxiom.com,' . $ccuserid . ',[EMAIL PROTECTED]'};

if (defined $newlayout){
$sender->MailFile({
subject =>  "WR# $wrnum for ${project} / ${list}
***SUCCEEDED***.  Layout Attached",
file => $newlayout,
msg => MAILMSG()});
}else{
$sender->MailMsg({
subject =>  "DMC WR# $wrnum for ${project} / ${list}
***SUCCEEDED***.",
msg => MAILMSG()});
}






*

The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Using Mail::Sender

2002-11-23 Thread Tin-Shan Chau
Using the following program, I managed to send a message with an attachment to 
multiple recipients using option 2, but not with options 1 and 3:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
use Mail::Sender;
$address1   = '[EMAIL PROTECTED]';
$address2   = '[EMAIL PROTECTED]';

#$recipients = [$address1, $address2];# 1. not OK
#$recipients = $address1 . ',' . $address2;# 2.  OK
push @recipients, $address1, $address2; # 3. not OK

$sender = 'tchau\@w3.bchydro.bc.ca';
$server = 'w3';
$attachment = '\temp\normal.txt';

$sender = new Mail::Sender {smtp => $server, from => $sender} or die "$! connect 
error";
#$sender->MailFile({to => $recipients,# Used with options 1 and 2
$sender->MailFile({to => \@recipients,  # Used with option 3
  subject => 'Here is the file',
  msg => "I'm sending you the file that you wanted. (2 recipients)",
  file => $attachment}) or die "$! send error";
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

I got the following message:

No such file or directory send error at test3.pl line 13


Strangely enough, I was able to send multiple files using all three variations (list 
separated by commas, reference to an anonymous array or reference to an array).

Can anyone tell me what the problem is?  Thanks.




Mail::Sender module

2003-01-29 Thread Dan Muey
Hello All,

Just a quick question I can't find an answer to and I believe one of our frequenters 
will know for sure as they are the module author

I've read somewhere ( in a dreaded Oreilley book ;D ) that the Mail series of modules 
uses the OS's native mail prog to send mail ( sendamil, qmail, etc ) vs. the 
Net::SMTP,etc type that talks directly to the mail servers.

I could be mistaken about that but I'm not totally sure.

Does Mail::Sender use the native OS's mail prog or does it talk to the smtp server 
directly?
If it uses the mailprog, do I need to/how do I specify the mail prog, path, switches 
etc?

Example, if I'm opening a pipe to the prog I'd need to do use this :
/usr/bin/sendmail -t
Or /var/qmail/bin/qmail-inject -f $to_address

Thanks,

Dan

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Mail::Sender question

2003-01-29 Thread Dan Muey
Shoot me if this is already in the docs but is it possible to send a variable that 
contains html as an html attachement without it being a file first using Mail::Sender?
 
Eg - 
 
my $html_file_name = "no_existant.html"; # there is no file called 'no_existant.html'
my $html  = " Hello, this would actually be more complete html generated 
by the script! ";
 
 
Is it possible to send $html as an attached file named $html_file_name even though it 
is not in itself file.
The other option I have it to creat a temporary file, mail it, then delete it.
 
What this script does is generate the html code for a contract based on a database 
entry and puts it all in $html.
Then it either prints $html out to the screen to be printed or it emails it to someone.
 
The way I have it now is if they want it emailed is it generates $html, creates a temp 
file, then mails the file , then dleetes the temp file.
 
This is fine but then you have to worry about, building up a lot of files that arenit 
deleted , conflicing filenames, same file name that results in wrong contract being 
sent to a person, etccc
 
Does that make sense to anyone?
 
Can Mail::Sender do that?
 
If it is in the CPAN page for Mail::Sender just say so, I'm still only part way 
throught that page and this thought occured to me.
 
Thanks
 
Dan
 



Mail::Sender weirdness

2003-12-23 Thread Dan Muey
Howdy all,

Here's wht I have:
$r .= "Sending...";
eval {
  my $senderx = new Mail::Sender {smtp => $smtp, from => $from };
  $senderx->Open({subject => $subj, to => $to });
  $senderx->SendLineEnc($msg);
  $senderx->Close();
};
if($@) { $r .= "Error sending mail: $@ -- $Mail::Sender::Error  \n"; }
else {  $r .= "Done  \n"; }

The issue I'm seeing is this:

If $to is a local address on $smtp (IE the same server this scirpt is on) It sends no 
problem regardless of where $from 's server is at.

If I set $to to an address on the other server and $from to a local address(or 
anythgin) it won't go.

The thing is I get "Sending...Done" everytime but never a dleivery and no hinf tof it 
in the logs. On one server I needed to use smtp authentication but that set $@ and 
said connection couldn't be made.

Any ideas what I'm missing would be awesome!

TIA

Dan
 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Mail::Sender question

2003-07-28 Thread Dan Muey
I use Mail::Sender all the time to send mail (Thanks Jenda!)
For a simple plain text message I do new( with smtp and from) then Open (with to and 
subject)
Since that is the minimal setup for me.

What I'd like to do is add headers if they are specifed, after Open() and 
SendLineEnc().

Is that possible?


use Mail::Sender;

my $sender = new Mail::Sender {smtp => $smtp, from => $frm};
$sender->Open({
to => $to,
subject => $sbj
});

# any way to add other headers here if they have a value???
 if($cc) {  cc => $cc; }
 if($bcc) {  bcc => $bcc; }
# any way to add other headers here if they have a value??? 


$sender->SendLineEnc($msg);
$sender->Close();

Or if I specify them in Open and they are empty will Mail::Sender simply ignore them?
IE :

$sender->Open({
to => $to,
subject => $sbj
cc => $cc,
bcc => $bcc,
confirm => $cnf,
priority => $pri,
});

In this case say $to, $sbj, $pri, and $bcc all have values but $cc and $cnf are 
empty.( or any combonation as long as $to and $sbj are ok) Will that still send ok and 
simply ignore the empty fields or will the empties cause problems?

TIA 

Dan

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mail::Sender

2002-05-23 Thread Nikola Janceski

Code please? (If I were a mind reader would I be programming?)

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 23, 2002 10:11 AM
> To: [EMAIL PROTECTED]
> Subject: Mail::Sender
> 
> 
> I receive the following error when using the 
> Mail::Sender module.  I am running it on Redhat 7.2.
> 
> Any help in resolving this issue is appreciated.
> 
> Thanks
> 
> Use of uninitialized value in concatenation (.) or 
> string at /usr/local/ActivePerl-
> 5.6/lib/site_perl/lib/5.6.1/Mail/Sender.pm Line 763, 
>  line 1.  Server error: 501 Command "helo" 
> requires and argument
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender

2002-05-23 Thread drieux


On Thursday, May 23, 2002, at 07:16 , Nikola Janceski wrote:

> Code please? (If I were a mind reader would I be programming?)

but of course you would be - it is your way of dealing
with the emotional crisis of the world but
you should have offered our young hero the following
minimal kvetch

>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
[..]
>> Use of uninitialized value in concatenation (.) or
>> string at /usr/local/ActivePerl-
>> 5.6/lib/site_perl/lib/5.6.1/Mail/Sender.pm Line 763,
>>  line 1.  Server error: 501 Command "helo"
>> requires and argument

well obviously look at where you are calling
Mail::Sender - since you seem to have passed
it something way munged

specifically you have zoned out something in the
OpenMultipart() - which is where line 763
is located.

{ one really should not be afraid to peek where the
compiler tells you the error occurs Even more fun
to actually plonk the code in the old perl debugger and
walk it in on the problem }

specifically:
 $_ = send_cmd $s, "helo $self->{'client'}";
if (/^[45]/) { close $s; return $self->{'error'}=COMMERROR($_); }

You did read the POD that came with it to start with?
and of course you ARE using

-w  # to warn you
use strict; # to make sure your side of reality is kosher.

I don't mean to be to harsh here - but without some Idea
of where in your code you fragged things - it really is
very difficult to do much other than wander

If you really do not need to send multipart messages, have
you thought about a simpler interface like

Mail::Mailer

cf:
http://www.wetware.com/drieux/pbl/email/forGeorge.txt

ciao
drieux

---

Time from whining at Nikola through the CPAN search
to download the module to reading the PM and the POD
so as to write this

6.73 Minutes

Take that you antiquated culturally deprived elements.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender

2007-01-18 Thread Jeff Pang
Hi,

This is the peer email site's behavior,not Perl's behavior.
Follow some rfc items (maybe rfc2821 or 2505),you should use your host's FQDN 
as HELO command's argument.Only when there is not FQDN for the host,you can use 
IP address as HELO's argument.
Exim is a very flexible system,it can be used easily for setting all kinds of 
antispam conditions (though I don't like this point at all).Maybe the peer 
site's administrator has set his MTA (Exim) to reject the HELO command like 
yours.So you may need to contact the email system administrator for resolving 
the problem,it's nothing about Perl.






Jeff Pang
2007-01-18



发件人: Brent Clark
发送时间: 2007-01-18 15:56:12
收件人: beginners@perl.org
抄送: 
主题: Mail::Sender

To whom it may concern

I have a problem whereby on sending an email, my mailserver does not allow for 
ip, (needs to be wrapped in [] ).

> > 220 mail.eccotours.co.za ESMTP Exim (Ecco Tours) 4.63 Wed, 17 Jan 2007 
> > 16:47:41 +0200
< < EHLO 192.168.111.248
> > 250-mail.eccotours.co.za Hello 192.168.111.248 [192.168.111.248]
> > 250-SIZE 15728640
> > 250-PIPELINING
> > 250 HELP
< < MAIL FROM:  <[EMAIL PROTECTED] >
> > 250 OK
< < RCPT TO:  <[EMAIL PROTECTED] >
> > 550 "REJECTED - Bad HELO - IP address not allowed [192.168.111.248]"
< < quit



If there any possible to get Mail::Sender to do this.

You feedback, would greatfully be appreciated.

Kind Regards
Brent Clark


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Re: Mail::Sender

2007-01-18 Thread Beginner
On 18 Jan 2007 at 9:55, Brent Clark wrote:

> To whom it may concern
> 
> I have a problem whereby on sending an email, my mailserver does not allow 
> for ip, (needs to be wrapped in [] ).
> 
> >> 220 mail.eccotours.co.za ESMTP Exim (Ecco Tours) 4.63 Wed, 17 Jan 2007 
> >> 16:47:41 +0200
> << EHLO 192.168.111.248
> >> 250-mail.eccotours.co.za Hello 192.168.111.248 [192.168.111.248]
> >> 250-SIZE 15728640
> >> 250-PIPELINING
> >> 250 HELP
> << MAIL FROM: <[EMAIL PROTECTED]>
> >> 250 OK
> << RCPT TO: <[EMAIL PROTECTED]>
> >> 550 "REJECTED - Bad HELO - IP address not allowed [192.168.111.248]"
> << quit
> 

I am not familiar with Mail::Sender but if, as I suspect, you are 
issuing the EHLO command then you need to specify your FQN (as per 
Jeff's mail) which might be something like mail.yourdomain.com.

If your the admin in charge of the exim server then the visiblename 
and primary_hostname needs to be set to the FQN of the server within 
the main section of your exim.conf (exim4.conf). It is possible to 
allow ip literates to connect to your server but I don't think it's 
recommended.

Good luck,
Dp,


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




RE: Mail::Sender

2002-02-12 Thread Nikola Janceski

It's a bug... I forgot the 'to' and it just dies at the line
$sender->Body();

I am submitting a bug report. It should handle an e-mail without a to and
only a cc, or bcc.


-Original Message-
From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 4:45 PM
To: '[EMAIL PROTECTED]'
Subject: Mail::Sender


Okay I am at a loss here...

I am using Mail::Sender to generate e-mails from a cgi page.
I am successful with genereating it using a regular script run from a
command line.

But when I put the code into my cgi it gives me this stupid error, (I
upgraded the module to the latest).
The code is almost an exact copy of one of the examples in the
documentation. And funny how it dies in the module and not in my script.

Here is the code I am using:

[snip all the checking and crap]

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

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


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

foreach $file (split(/\s+/, $FORM{'files'})){
if ($file =~ /.*\.tar(\.Z)?$/i) { $type = "gzip"; $app =
"application";}
if ($file =~ /.*\.zip$/i) { $type = "zip"; $app = "application";}
if ($file =~ /.*\.html$/i) { $type = "html"; $app = "text";}
if ($file =~ /.*\.doc$/i) { $type = "word"; $app = "application";}
    $sender->SendFile({
ctype => "$app/$type",
encoding => 'Base64',
file => "$file"
}) || die "$Mail::Sender::Error\n";
}

$sender->Close() || die "$Mail::Sender::Error\n";

__END__

The ERROR I receive is:
can't use an undefined value as a symbol reference at
//perl-5.6.1-unix/lib/perl5/site_perl/5.6.1/mail/sender.pm line 1229.
Any clues as to what might be my problem?
$FORM contains true values foreach key or "";

here is the code from the module:

sub EndPart {
 my $self = shift;
# return unless $self->{part};
 my $s = $self->{'socket'};
 if ($self->{buffer}) {
  my $code = $self->{code};
  print $s (&$code($self->{buffer}));
  delete $self->{buffer};
 }
 print $s "\r\n--",$self->{'boundary'},"\r\n";  #  line 1229
 undef $self->{part};
 1;
}



ANY HELP IS MUCH APPRECIATED <8^s

Nikola Janceski
Summit Systems, Inc.
212-896-3400

To find out a girl's faults, praise her to her girl friends.
-- Benjamin Franklin




The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender

2002-02-12 Thread Jenda Krynicky

From:   Nikola Janceski <[EMAIL PROTECTED]>

> Okay I am at a loss here...
> 
> I am using Mail::Sender to generate e-mails from a cgi page.
> I am successful with genereating it using a regular script run from a
> command line.
> 
> But when I put the code into my cgi it gives me this stupid error, (I
> upgraded the module to the latest). The code is almost an exact copy
> of one of the examples in the documentation. And funny how it dies in
> the module and not in my script.
> 
> Here is the code I am using:
> 
> [snip all the checking and crap]
> 
> use Mail::Sender;
> ref($sender = new Mail::Sender
>   {smtp => 'mailhost..com'}) || die "$sender --
>   $Mail::Sender::Error\n";
> 
> $sender->OpenMultipart({from => $FORM{'from'}, cc => $FORM{'cc'},
>subject => $FORM{'subject'} } ) || die
> "$Mail::Sender::Error\n";

Don't ask me why but ... the method returns a the $sender object if 
successfull and a negative error number if not.

This should be 

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

or

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

To make things worse ... ->SendFile() return 1 if successfull and 
negative number if not.

Do you get any helpfull error message now?

Sorry, Jenda


=== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
--- me

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender

2002-03-13 Thread Jenda Krynicky

From:   [EMAIL PROTECTED]
> I am using Mail::Sender on AIX 4.3.3 and encounter the 
> following error when running a script.
> 
> Use of uninitialized value 
> at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sender.pm 
> line 944,  chunk 5.
> Can't use an undefined value as filehandle reference 
> at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sender.pm 
> line 944,  chunk 5.
> 
> I have used this on other sysystem without any 
> problems.  Does anyone know if there are any issues with 
> Mail::Sender on AIX 4.3.3?

It's not caused by the version of OS, but of perl. Sorry for this.
Please install the 0.7.13 version uploaded to CPAN and 
http://Jenda.Krynicky.cz today.

Jenda

=== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
--- me

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Mail::Sender Timeout

2002-03-13 Thread gkhgkh

Where in the Sender.pm file can I find the parameter for 
timeout to the mail server?  I need to increase this.  I 
keep getting a cannot connect error. 

Thanks

Grant 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender

2002-03-14 Thread Gary Stainburn

On Wednesday 13 March 2002 5:23 pm, Jenda Krynicky wrote:
> From: [EMAIL PROTECTED]
>
> > I am using Mail::Sender on AIX 4.3.3 and encounter the
> > following error when running a script.
> >
> > Use of uninitialized value
> > at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sender.pm
> > line 944,  chunk 5.
> > Can't use an undefined value as filehandle reference
> > at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sender.pm
> > line 944,  chunk 5.
> >
> > I have used this on other sysystem without any
> > problems.  Does anyone know if there are any issues with
> > Mail::Sender on AIX 4.3.3?
>
> It's not caused by the version of OS, but of perl. Sorry for this.
> Please install the 0.7.13 version uploaded to CPAN and
> http://Jenda.Krynicky.cz today.
>
> Jenda
>
> === [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
> There is a reason for living. There must be. I've seen it somewhere.
> It's just that in the mess on my table ... and in my brain.
> I can't find it.
>   --- me

Hi Jenda,

I've just installed 0.7.13 on one of my RH72 boxes, along with my small perl 
script wrapper.  I've used this a about 10 boxes now, but this time I get the 
following error. (I've also include my script)

[cms@ollie cms]$ SendMail -t [EMAIL PROTECTED] -s "Daily Lost Calls" -m 
lostcalls.txt
[EMAIL PROTECTED]
s=Daily Lost Calls
m=lostcalls.txt
mailer failed: connect() failed: Invalid argument

__SendMail__
#!/usr/bin/perl -w

use Mail::Sender;
use Getopt::Std;

my $sender=new Mail::Sender {from=>'[EMAIL PROTECTED]',
 smtp=>'mail.ringways.co.uk',
 reply=>'[EMAIL PROTECTED]',
 fake_from=>'[EMAIL PROTECTED]'};
my %opts=();

getopts('t:f:s:m:',\%opts);

print "t=$opts{t}\n" if $opts{t};
print "f=$opts{f}\n" if $opts{f};
print "s=$opts{s}\n" if $opts{s};
print "m=$opts{m}\n" if $opts{m};
die "Recipient not specified" unless $opts{t};
die "Subject not specified" unless $opts{s};
if ( $opts{f} ) {
  die "File not found" unless (  -f $opts{f} );
}
if ( $opts{m} ) {
  die "Message file not found" unless (  -f $opts{m} );
}

my $msg='';
if ( $opts{m}) {
  open(FIN,"$opts{m}") || die "cannot open message file: $!\n";
} else {
  open(FIN,"<&STDIN") || die "cannot open message file: $!\n";
}
while () {
  chomp;
  $msg.="$_\r\n";
}
close(FIN);

if ( $opts{f} ) {
$sender->MailFile({to=>$opts{t},
  subject=>$opts{s},
  file=>$opts{f},
  msg=>$msg}) || die "mailer failed: $Mail::Sender::Error\n
} else {
$sender->MailMsg({to=>$opts{t},
  subject=>$opts{s},
  msg=>$msg}) || die "mailer failed: $Mail::Sender::Error\n
}
__END__

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender

2002-03-14 Thread Gary Stainburn

Further to this, 

when I installed 0.7.10 instead of the 0.7.13 it worked fine

Gary
On Thursday 14 March 2002 11:14 am, Gary Stainburn wrote:
> On Wednesday 13 March 2002 5:23 pm, Jenda Krynicky wrote:
> > From:   [EMAIL PROTECTED]
> >
> > > I am using Mail::Sender on AIX 4.3.3 and encounter the
> > > following error when running a script.
> > >
> > > Use of uninitialized value
> > > at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sender.pm
> > > line 944,  chunk 5.
> > > Can't use an undefined value as filehandle reference
> > > at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sender.pm
> > > line 944,  chunk 5.
> > >
> > > I have used this on other sysystem without any
> > > problems.  Does anyone know if there are any issues with
> > > Mail::Sender on AIX 4.3.3?
> >
> > It's not caused by the version of OS, but of perl. Sorry for this.
> > Please install the 0.7.13 version uploaded to CPAN and
> > http://Jenda.Krynicky.cz today.
> >
> > Jenda
> >
> > === [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
> > There is a reason for living. There must be. I've seen it somewhere.
> > It's just that in the mess on my table ... and in my brain.
> > I can't find it.
> > --- me
>
> Hi Jenda,
>
> I've just installed 0.7.13 on one of my RH72 boxes, along with my small
> perl script wrapper.  I've used this a about 10 boxes now, but this time I
> get the following error. (I've also include my script)
>
> [cms@ollie cms]$ SendMail -t [EMAIL PROTECTED] -s "Daily Lost Calls"
> -m lostcalls.txt
> [EMAIL PROTECTED]
> s=Daily Lost Calls
> m=lostcalls.txt
> mailer failed: connect() failed: Invalid argument
>
> __SendMail__
> #!/usr/bin/perl -w
>
> use Mail::Sender;
> use Getopt::Std;
>
> my $sender=new Mail::Sender {from=>'[EMAIL PROTECTED]',
>  smtp=>'mail.ringways.co.uk',
>  reply=>'[EMAIL PROTECTED]',
>  fake_from=>'[EMAIL PROTECTED]'};
> my %opts=();
>
> getopts('t:f:s:m:',\%opts);
>
> print "t=$opts{t}\n" if $opts{t};
> print "f=$opts{f}\n" if $opts{f};
> print "s=$opts{s}\n" if $opts{s};
> print "m=$opts{m}\n" if $opts{m};
> die "Recipient not specified" unless $opts{t};
> die "Subject not specified" unless $opts{s};
> if ( $opts{f} ) {
>   die "File not found" unless (  -f $opts{f} );
> }
> if ( $opts{m} ) {
>   die "Message file not found" unless (  -f $opts{m} );
> }
>
> my $msg='';
> if ( $opts{m}) {
>   open(FIN,"$opts{m}") || die "cannot open message file: $!\n";
> } else {
>   open(FIN,"<&STDIN") || die "cannot open message file: $!\n";
> }
> while () {
>   chomp;
>   $msg.="$_\r\n";
> }
> close(FIN);
>
> if ( $opts{f} ) {
> $sender->MailFile({to=>$opts{t},
>   subject=>$opts{s},
>   file=>$opts{f},
>   msg=>$msg}) || die "mailer failed: $Mail::Sender::Error\n
> } else {
> $sender->MailMsg({to=>$opts{t},
>   subject=>$opts{s},
>   msg=>$msg}) || die "mailer failed: $Mail::Sender::Error\n
> }
> __END__

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Mail::Sender with SSL

2012-08-07 Thread Thomas Dean
Hi there,

I have succeeded in sending mail to my SMTP server with Mail::Sender
without SSL. But now I'm wondering how to do that with SSL, for example,
GMail. After reading the doc, I set TLS_required to 1 when I'm calling
Mail::Sender->new, but nohing works. I tried to debug the program but
found nothing different whether I turn TLS_required on or not.

So how can I send mail with SSL?

BTW, I cannot sill tell SSL from TLS.

Thomas


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: using Mail::Sender

2004-11-20 Thread Gunnar Hjalmarsson
Mike Blezien wrote:
I was hoping someone maybe able to supply a simple code example using
the Mail::Sender module for sending a message via SMTP
w/authentication, a message body and attaching an image to the email.
I've been reading through the examples on the CPAN site, but haven't
quiet gotten it figured out yet.
The Mail::Sender POD does contain a simple code example.
Any help would be much appreciated.
Show us your best shot, let us know which error message(s) you receive,
and somebody may be able to help you correct it.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



Re: using Mail::Sender

2004-11-20 Thread Mike Blezien
Gunnar Hjalmarsson wrote:
Mike Blezien wrote:
I was hoping someone maybe able to supply a simple code example using
the Mail::Sender module for sending a message via SMTP
w/authentication, a message body and attaching an image to the email.
I've been reading through the examples on the CPAN site, but haven't
quiet gotten it figured out yet.

The Mail::Sender POD does contain a simple code example.
Any help would be much appreciated.

Show us your best shot, let us know which error message(s) you receive,
and somebody may be able to help you correct it.
I printed out the Mail::Sender POD and will be experimenting with some code and 
hopefully will get it working shortly... thx's

--
Mike(mickalo)Blezien
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



Re: using Mail::Sender

2005-05-19 Thread Offer Kaye
On 5/19/05, Graeme McLaren wrote:
> Hi all, I'm wanting to use the Mail::Sender module.  When sending emails
> I'll need to use an SMTP server.  On CPAN I found the following in the
> documentation, is this all I would need to send email?  What is the "auth"
> key for?  Surely all you need is a host, username and password?
> 

If indeed you are using a login method (username and password), then
replace "NTLM" with LOGIN. So instead of:

>auth => 'NTLM',

Use:

>auth => 'LOGIN',

HTH,
-- 
Offer Kaye

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: using Mail::Sender

2005-05-19 Thread Graeme McLaren
Offer, everyone, I tried sending an email from a mail server and I got an 
error:

Local user "user" unknown on host "mail.smtpserver.com"
It seems to break on $email.  The "user" that the error reports is the value 
of $email, so why isn't it sending the email?

Offer thank you for your reply, that was helpful!
Here's the code:
######
 my $sender=Mail::Sender->new;
 if ($sender->MailMsg({
 smtp=> 'mail.smtpserver.com',
 from=> '[EMAIL PROTECTED]',
 to  => "$email",
 subject => 'test email',
 msg => 'testing email',
 auth=> 'LOGIN',
 authid  => 'username',
 authpwd => 'password',
 }) < 0) {
   die "$Mail::Sender::Error\n";
 }
 print "Mail sent OK."
##

From: Offer Kaye <[EMAIL PROTECTED]>
Reply-To: Offer Kaye <[EMAIL PROTECTED]>
To: Perl Beginners 
Subject: Re: using Mail::Sender
Date: Thu, 19 May 2005 13:39:54 +0300
MIME-Version: 1.0
Received: from lists.develooper.com ([63.251.223.186]) by 
mc7-f33.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Thu, 19 May 2005 
03:40:02 -0700
Received: (qmail 27009 invoked by uid 514); 19 May 2005 10:39:59 -
Received: (qmail 27000 invoked from network); 19 May 2005 10:39:59 -
Received: from x1a.develooper.com (HELO x1.develooper.com) (216.52.237.111) 
 by lists.develooper.com with SMTP; 19 May 2005 10:39:59 -
Received: (qmail 12391 invoked by uid 225); 19 May 2005 10:39:59 -
Received: (qmail 12379 invoked by alias); 19 May 2005 10:39:58 -
Received: pass (x1.develooper.com: domain of [EMAIL PROTECTED] 
designates 64.233.170.192 as permitted sender)
Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.192)
by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 19 May 2005 
03:39:57 -0700
Received: by rproxy.gmail.com with SMTP id z35so203936rnefor 
; Thu, 19 May 2005 03:39:54 -0700 (PDT)
Received: by 10.38.96.6 with SMTP id t6mr930291rnb;Thu, 19 May 2005 
03:39:54 -0700 (PDT)
Received: by 10.38.181.35 with HTTP; Thu, 19 May 2005 03:39:54 -0700 (PDT)
X-Message-Info: JGTYoYF78jEHjJx36Oi8+Z3TmmkSEdPtfpLB7P/ybN8=
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Post: <mailto:beginners@perl.org>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <mailto:[EMAIL PROTECTED]>
List-Id: 
Delivered-To: mailing list beginners@perl.org
Delivered-To: beginners@perl.org
X-Spam-Status: No, hits=-2.5 required=8.0tests=BAYES_00,RCVD_BY_IP
X-Spam-Check-By: la.mx.develooper.com
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;s=beta; 
d=gmail.com;
h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; 
   
b=B8rPXwS0B1KoZ2FzOGjKR8lsqK/ITYI2FWtgzdaQ5tmAROABsY0hEQdNVNx+0N+xPNAV0VAYjYPuSQhqZ8g+Ms/lrT0/V95nat+DgISGgJEIXOS9fm8aAFwHJH7TaQOtAKAVPxdzmLFLoxv2QDt0OOM/T6XerR7p0yM69iFfn1Q=
References: <[EMAIL PROTECTED]>
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 19 May 2005 10:40:03.0785 (UTC) 
FILETIME=[1D948B90:01C55C5F]

On 5/19/05, Graeme McLaren wrote:
> Hi all, I'm wanting to use the Mail::Sender module.  When sending emails
> I'll need to use an SMTP server.  On CPAN I found the following in the
> documentation, is this all I would need to send email?  What is the 
"auth"
> key for?  Surely all you need is a host, username and password?
>

If indeed you are using a login method (username and password), then
replace "NTLM" with LOGIN. So instead of:
>auth => 'NTLM',
Use:
>auth => 'LOGIN',
HTH,
--
Offer Kaye
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



Re: using Mail::Sender

2005-05-19 Thread Offer Kaye
On 5/19/05, Graeme McLaren wrote:
> Offer, everyone, I tried sending an email from a mail server and I got an
> error:
> 
> Local user "user" unknown on host "mail.smtpserver.com"
> 
> 
> It seems to break on $email.  The "user" that the error reports is the value
> of $email, so why isn't it sending the email?
> 
>   from=> '[EMAIL PROTECTED]',
>       to  => "$email",

According to http://search.cpan.org/dist/Mail-Sender/Sender.pm#AUTHENTICATION
: "If you get a "Local user "[EMAIL PROTECTED]" unknown on host "zzz""
message... it only accepts messages to or from a local user."
Maybe your server doesn't like '[EMAIL PROTECTED]' as a from
field? More likely, 'user' is not a valid email - try using a real
email address. I you want to use a name, the format is usually "user
<[EMAIL PROTECTED]>".

HTH,
-- 
Offer Kaye

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: Using Mail::Sender

2002-11-24 Thread Jenda Krynicky
From: Tin-Shan Chau <[EMAIL PROTECTED]>
> Using the following program, I managed to send a message with an
> attachment to multiple recipients using option 2, but not with options
> 1 and 3:
> 
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> use Mail::Sender;
> $address1   = '[EMAIL PROTECTED]';
> $address2   = '[EMAIL PROTECTED]';
> 
> #$recipients = [$address1, $address2];# 1. not OK
> #$recipients = $address1 . ',' . $address2;# 2.  OK
> push @recipients, $address1, $address2; # 3. not OK

It's simply not implemented (yet).

Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender question

2002-11-24 Thread Jenda Krynicky
From: Goodman Kristi - kgoodm <[EMAIL PROTECTED]>

> I have the code (below) that works fine with the older version of
> MAIL::SENDER (v0.7.06) but will not send with the new version of
> MAIL::SENDER (v0.7.14.1) .  Any thoughts?

Maybe if you tested the return value of MailMsg/MailFile and printed 
out the error message from $Mail::Sender::Error you would know what's 
wrong.

Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Using Mail::Sender

2002-11-25 Thread Tom Allison
Jenda Krynicky wrote:

From: Tin-Shan Chau <[EMAIL PROTECTED]>


Using the following program, I managed to send a message with an
attachment to multiple recipients using option 2, but not with options
1 and 3:


use Mail::Sender;
$address1   = '[EMAIL PROTECTED]';
$address2   = '[EMAIL PROTECTED]';

#$recipients = [$address1, $address2];# 1. not OK
#$recipients = $address1 . ',' . $address2;# 2.  OK
push @recipients, $address1, $address2; # 3. not OK



It's simply not implemented (yet).



Well that makes it pretty difficult, doesn't it?

:)


--
When pleasure remains, does it remain a pleasure?


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender module

2003-01-29 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]>
> Just a quick question I can't find an answer to and I believe one of
> our frequenters will know for sure as they are the module author
> 
> I've read somewhere ( in a dreaded Oreilley book ;D ) that the Mail
> series of modules uses the OS's native mail prog to send mail (
> sendamil, qmail, etc ) vs. the Net::SMTP,etc type that talks directly
> to the mail servers.

I think this information is totally wrong.
Some Mail:: modules use an external program, some talk to a server 
with SMTP, some with IMAP, some are not meant for sending email at 
all (Mail::Addressbook,Mail::MboxParser, ...), ...
The only thing they have in the common is the fact that they are all 
related to mailing.
 
> I could be mistaken about that but I'm not totally sure.
> 
> Does Mail::Sender use the native OS's mail prog or does it talk to the
> smtp server directly?

Directly to an SMTP server.

Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Mail::Sender module

2003-01-29 Thread Dan Muey


> From: "Dan Muey" <[EMAIL PROTECTED]>
> > Just a quick question I can't find an answer to and I 
> believe one of 
> > our frequenters will know for sure as they are the module author
> > 
> > I've read somewhere ( in a dreaded Oreilley book ;D ) that the Mail 
> > series of modules uses the OS's native mail prog to send mail ( 
> > sendamil, qmail, etc ) vs. the Net::SMTP,etc type that 
> talks directly 
> > to the mail servers.
> 
> I think this information is totally wrong.

Those darn Oreilley books!

Actually I was reading your module's page on cpan and just 
saw the part that said it talks directly to the server!
Sorry I should have RTFM better! I'll do that to find the answers to my other questions
Before I post to the list for help.

Thanks Jenda, I knew you'd come through!

Dan

> Some Mail:: modules use an external program, some talk to a server 
> with SMTP, some with IMAP, some are not meant for sending email at 
> all (Mail::Addressbook,Mail::MboxParser, ...), ...
> The only thing they have in the common is the fact that they are all 
> related to mailing.
>  
> > I could be mistaken about that but I'm not totally sure.
> > 
> > Does Mail::Sender use the native OS's mail prog or does it 
> talk to the 
> > smtp server directly?
> 
> Directly to an SMTP server.
> 
> Jenda
> = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
> When it comes to wine, women and song, wizards are allowed 
> to get drunk and croon as much as they like.
>   -- Terry Pratchett in Sourcery
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender question

2003-01-29 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]>
> Shoot me if this is already in the docs but is it possible to send a
> variable that contains html as an html attachement without it being a
> file first using Mail::Sender?

:-)

Yes it it possible.

    $sender = new Mail::Sender {...};
$sender->OpenMultipart({..});
$sender->Body({ctype => 'text/plain', msg => $message_body});
$sender->Part({ctype => 'text/html', disposition => 'attachment',
msg => $html
});
$sender->Close();

Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Mail::Sender question

2003-01-29 Thread Dan Muey
> 
> From: "Dan Muey" <[EMAIL PROTECTED]>
> > Shoot me if this is already in the docs but is it possible 
> to send a 
> > variable that contains html as an html attachement without 
> it being a 
> > file first using Mail::Sender?
> 
> :-)
> 
> Yes it it possible.
> 
>   $sender = new Mail::Sender {...};
>   $sender->OpenMultipart({..});
>   $sender->Body({ctype => 'text/plain', msg => $message_body});
>   $sender->Part({ctype => 'text/html', disposition => 
> 'attachment',
>   msg => $html
>   });
>   $sender->Close();

That is creamy! Thanks a million! Your module rocks! 
If your ever in St. Louis let me know and I'll buy you a beer!

Dan

> 
> Jenda
> = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
> When it comes to wine, women and song, wizards are allowed 
> to get drunk and croon as much as they like.
>   -- Terry Pratchett in Sourcery
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Mail::Sender question

2003-01-29 Thread Dan Muey
So to send an html file attachment (from html in a variable not a file) with images ::
Which is the best way to send the images?
use disposition=inline and the cid:img1 img tag
or
Use disposition=attachment and a regular img tag 

If neither what am I missing?

$sender = new Mail::Sender {...};
$sender->OpenMultipart({..});
$sender->Body({ctype => 'text/plain', msg => $text});
$sender->Part({ctype => 'text/html', disposition => 'attachment',
msg => $contract_html
});
$sender->Attach({
description => 'Infiniplex Logo',
ctype => 'image/gif',
encoding => 'base64',
#Which one of these 'dispositions' would be best if either?
#   disposition => "inline; 
filename=\"infinlogo.gif\";\r\nContent-ID: ",
#   disposition => 'attachment; filename="infinlogo.gif"; 
type="Gif Image"',
file => 'infinlogo.gif'
});
$sender->Close();

Thanks again as usual!

Dan

> 
> From: "Dan Muey" <[EMAIL PROTECTED]>
> > Shoot me if this is already in the docs but is it possible 
> to send a 
> > variable that contains html as an html attachement without 
> it being a 
> > file first using Mail::Sender?
> 
> :-)
> 
> Yes it it possible.
> 
>   $sender = new Mail::Sender {...};
>   $sender->OpenMultipart({..});
>   $sender->Body({ctype => 'text/plain', msg => $message_body});
>   $sender->Part({ctype => 'text/html', disposition => 
> 'attachment',
>   msg => $html
>   });
>   $sender->Close();
> 
> Jenda
> = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
> When it comes to wine, women and song, wizards are allowed 
> to get drunk and croon as much as they like.
>   -- Terry Pratchett in Sourcery
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Mail::Sender question

2003-01-29 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]>

> So to send an html file attachment (from html in a variable not a
> file) with images :: Which is the best way to send the images? use
> disposition=inline and the cid:img1 img tag or Use
> disposition=attachment and a regular img tag 

Well this can get a bit complex. Most probably you'll have to 
experiment a bit. Maybe even with nested multipart parts (bleargh).

Try one thing first. Add

multipart => 'Related'

into the OpenMultipart({...}) call and use disposition=>'inline' + 
cids for the images.

If this doesn't work try:

$sender = new Mail::Sender {...};
$sender->OpenMultipart({..});
$sender->Body({ctype => 'text/plain', msg => $text});
$sender->Part({ctype => 'multipart/related'});
$sender->Part({ctype => 'text/html', disposition => 'attachment',
msg => $contract_html
});
$sender->Attach({
description => 'Infiniplex Logo',
ctype => 'image/gif',
encoding => 'base64',
disposition => "inline; 
filename=\"infinlogo.gif\";\r\nContent-ID:
",
file => 'infinlogo.gif'
});
$sender->EndPart("multipart/related");
$sender->Close();

Jenda

= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender weirdness

2003-12-29 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]>
> Here's wht I have:
> $r .= "Sending...";
> eval {
>   my $senderx = new Mail::Sender {smtp => $smtp, from => $from };

You forgot to tell Mail::Sender to die in case of an error :-)

>   $senderx->Open({subject => $subj, to => $to });
>   $senderx->SendLineEnc($msg); $senderx->Close();
> };
> if($@) { $r .= "Error sending mail: $@ -- $Mail::Sender::Error 
> \n"; } else {  $r .= "Done  \n"; }
> 
> The issue I'm seeing is this:
> 
> If $to is a local address on $smtp (IE the same server this scirpt is
> on) It sends no problem regardless of where $from 's server is at.
> 
> If I set $to to an address on the other server and $from to a local
> address(or anythgin) it won't go.

I bet the server is set up to disallow "relay". So either the sender 
or the adressee has to be local. Or you have to authenticate.

> The thing is I get "Sending...Done" everytime but never a dleivery and
> no hinf tof it in the logs. On one server I needed to use smtp
> authentication but that set $@ and said connection couldn't be made.
> 
> Any ideas what I'm missing would be awesome!

By default Mail::Sender does not raise exceptions. It returns 
negative error codes.

Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




RE: Mail::Sender weirdness

2003-12-29 Thread Dan Muey
> From: "Dan Muey" <[EMAIL PROTECTED]>
> > Here's wht I have:
> > $r .= "Sending...";
> > eval {
> >   my $senderx = new Mail::Sender {smtp => $smtp, from => $from };
> 
> You forgot to tell Mail::Sender to die in case of an error :-)

Oohhh, yeah :) Thanks

> 
> >   $senderx->Open({subject => $subj, to => $to });
> >   $senderx->SendLineEnc($msg); $senderx->Close();
> > };
> > if($@) { $r .= "Error sending mail: $@ -- 
> $Mail::Sender::Error  
> > \n"; } else {  $r .= "Done  \n"; }
> > 
> > The issue I'm seeing is this:
> > 
> > If $to is a local address on $smtp (IE the same server this 
> scirpt is
> > on) It sends no problem regardless of where $from 's server is at.
> > 
> > If I set $to to an address on the other server and $from to a local 
> > address(or anythgin) it won't go.
> 
> I bet the server is set up to disallow "relay". So either the sender 
> or the adressee has to be local. Or you have to authenticate.

One of them is always local I'll try the authentication bit again.

> 
> > The thing is I get "Sending...Done" everytime but never a 
> dleivery and 
> > no hinf tof it in the logs. On one server I needed to use smtp 
> > authentication but that set $@ and said connection couldn't be made.
> > 
> > Any ideas what I'm missing would be awesome!
> 
> By default Mail::Sender does not raise exceptions. It returns 
> negative error codes.
> 

Right on! I'll take a look at your cpan page again and redo my problem handling angle.

As usual you rock!

> Jenda




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Mail Sender in Perl

2003-07-08 Thread Pablo Fischer
Hi!

Im looking for information on how to create my own Mail Sender that connects 
to a SMTP Server, I found a few sites, so Im looking for more information to 
start. What do I want? I want to send mails from my perl source to any smtp 
server not mattering if it's running sendmail, postfix, exim, ms, bla bla.

Howerver I also found Mail::Sender, but this module doesnt have the enough 
information so that I can start with it taking like a Mail Sender. Does 
anybody have more information of Mail::Sender?

Thanks :-)
[Note: However I had read information in this website: 
http://www.cs.cf.ac.uk/Dave/PERL/node180.html]

Pablo Fischer
-- 
Pablo Fischer Sandoval ([EMAIL PROTECTED])
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131  AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mail::Sender question

2003-07-28 Thread Dan Muey
Ok I'll simplify the question:

If I do this:

use Mail::Sender;

my $sender = new Mail::Sender {smtp => $ip, from => $frm};
$sender->Open({
to => $to,
subject => $sb,
priority => 5,
cc => $cc,
bcc => $bcc,
confirm => $cfm,
});
$sender->SendLineEnc($msg);
$sender->Close();

If $cc, $bcc, or $cfm are empty will it still work (just ignore them or ???) or error 
out?

TIA :)

Dan

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mail::Sender question

2003-08-04 Thread Dan Muey

> From: "Dan Muey" <[EMAIL PROTECTED]>
> > If I do this:
> > 
> > use Mail::Sender;
> > 
> > my $sender = new Mail::Sender {smtp => $ip, from => $frm}; 
> > $sender->Open({  to => $to,
> >  subject => $sb,
> >  priority => 5,
> >  cc => $cc,
> >  bcc => $bcc,
> >  confirm => $cfm,
> > });
> > $sender->SendLineEnc($msg);
> > $sender->Close();
> > 
> > If $cc, $bcc, or $cfm are empty will it still work (just 
> ignore them 
> > or ???) or error out?
> 
> It should ignore them. 
> It will definitely ignore them if they are undefined, I'm not 100% 
> sure what will it do if you set those to empty strings.
> 
> Anyway ... try and see. And let me know if anything breaks :-)
> 
> Jenda
Thanks Jenda,

Works great! If any of them are empty(not undefined) the mails zips through without a 
wimper.
Your module rocks!

Thanks

Dan 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mail::Sender question

2003-08-04 Thread Dan Muey

> > What I'd like to do is add headers if they are specifed, 
> after Open() 
> > and SendLineEnc().
> 
> No. When Open() or OpenMultipart() returns all headers have already 
> been sent and the message body is expected. There is no way to add 
> any more headers.
>  
> Unlike MIME::Lite Mail::Sender doesn't prepare the whole message 
> before sending it. Mail::Sender connects to the server within the 
> Open()/OpenMultipart(), sends the headers and other stuff and then 
> continues sending anything you instruct it to immediately.
> 
> > Or if I specify them in Open and they are empty will Mail::Sender 
> > simply ignore them?
> 
> Yes it should
> 
> Jenda

Thanks again!
Dan

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mail::Sender question

2003-08-04 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]>
> If I do this:
> 
> use Mail::Sender;
> 
> my $sender = new Mail::Sender {smtp => $ip, from => $frm};
> $sender->Open({
>  to => $to,
>  subject => $sb,
>  priority => 5,
>  cc => $cc,
>  bcc => $bcc,
>  confirm => $cfm,
> });
> $sender->SendLineEnc($msg);
> $sender->Close();
> 
> If $cc, $bcc, or $cfm are empty will it still work (just ignore them
> or ???) or error out?

It should ignore them. 
It will definitely ignore them if they are undefined, I'm not 100% 
sure what will it do if you set those to empty strings.

Anyway ... try and see. And let me know if anything breaks :-)

Jenda
=== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain
I can't find it.
--- me


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mail::Sender question

2003-08-04 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]>
> For a simple plain text message I do new( with smtp and from) then
> Open (with to and subject) Since that is the minimal setup for me.
> 
> What I'd like to do is add headers if they are specifed, after Open()
> and SendLineEnc().

No. When Open() or OpenMultipart() returns all headers have already 
been sent and the message body is expected. There is no way to add 
any more headers.
 
Unlike MIME::Lite Mail::Sender doesn't prepare the whole message 
before sending it. Mail::Sender connects to the server within the 
Open()/OpenMultipart(), sends the headers and other stuff and then 
continues sending anything you instruct it to immediately.

> Or if I specify them in Open and they are empty will Mail::Sender
> simply ignore them?

Yes it should

Jenda
=== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain
I can't find it.
--- me


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Help using Mail::Sender

2002-01-13 Thread Arthur Perley

Im trying to use the Perl module Mail::Sender to send email through SMTP.
It works great for local domains but when I try to use it for extranet
domains I get an error:
[Local user "'[EMAIL PROTECTED]'" unknown on host "mail.myhost.com"]
This isn't the way it's supposed to work, AFAIK.

I'm on Win2K using SMTP from Rockliffe MailSite 4.5.6 and Perl v5.6.1 (build
630) for MSWin32-x86-multi-thread.
I have security configured for no relay allowed, and Auth ETRN but even
disabled the error occurs.

Any help is appreciated. The test code follows.

Thanks
Arthur

Documentation is here:
http://search.cpan.org/doc/JENDA/Mail-Sender-0.7.10/Sender.pm.html
========
#BOF
# Using Mail::Sender - module for sending mails with/without attachments
through an SMTP server

use Mail::Sender;
 ref ($sender = new Mail::Sender({from => '[EMAIL PROTECTED]',
smtp => 'mail.myhost.com'})) or die "$Mail::Sender::Error\n";

(ref ($sender->MailMsg({to =>'[EMAIL PROTECTED]',
   subject => 'Mail::Sender test',
   msg => "You,\n This is a Mail::Sender test."}))
  and print "Mail sent OK.") or die "$Mail::Sender::Error\n";

#EOF

==
Arthur Perley
Nice Bar/Internet Cafe
82 E 3rd St
New York, NY 10003-9215
http://www.bigmagic.com
==



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[ANN] Mail::Sender 0.7.12

2002-02-18 Thread Jenda Krynicky

Uploaded to http://Jenda.Krynicky.cz
Available via PPM from http://Jenda.Krynicky.cz/perl/
Uploaded to and soon to be available from CPAN

New:
debuging
accepts multiline responses (the old qmail bug is fixed at last)
miscelaneous fixes

Enjoy, Jenda

=== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
--- me

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender Timeout

2002-03-13 Thread Jenda Krynicky

From:   [EMAIL PROTECTED]
> Where in the Sender.pm file can I find the parameter for 
> timeout to the mail server?  I need to increase this.  I 
> keep getting a cannot connect error. 
> 
> Thanks
> 
> Grant 

Sorry, there is no such parameter. I'm using plain socket()s with 
connect() and stuff, maybe you can change the timeouts of these, 
but I don't know how.

But ... are you sure you want to connect to THAT server if your 
connection to it is so weak? You are supposed to pass the 
message to your LOCAL mailserver and leave the distribution and 
retries to the recipients' servers to it. Don't try to contact the 
recipients' mailservers, pass it to your own and forget about it.

Jenda

=== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
--- me

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Need help with Mail::Sender

2009-06-25 Thread Dennis Wicks

Greetings;

Following the docs I have it working, somewhat, but it is
not handling html w/inline images correctly.

Instead of getting an html message with inline image it is
sending a blank email with both the html and the jpg image
as attachments.

Here is my program. Does anyone see the problem?

Many TIA!
Dennis

 === === program follows  === ===

> #!/usr/bin/perl
>
> use strict;
> use warnings;
> use Mail::Sender;
>
> my $image = 'kitten.jpg';
>
> my $sender = Mail::Sender->new( {
> smtp   => 'smtpout.secureserver.net',
> port   => '3535',
> from   => 't...@mgssub.com',
>auth=> 'LOGIN',
> authid  => 't...@mgssub.com',
> authpwd => 'xxx'
>} );
> ref $sender or die
>   "Object creation failed: $Mail::Sender::Error\n";
>
> my $recipients = 'gra...@mgssub.com';
>
>  if (ref $sender->OpenMultipart({
>to => $recipients,
>subject => 'Test Sending HTML and inline message',
>boundary => '--boundarytest1',
>multipart => 'related'})) {
>$sender->Attach(
>{description => 'html body',
>ctype => 'text/html; charset=us-ascii',
>encoding => '7bit',
>disposition => 'NONE',
>file => 'test-inline.html'
>        });
>$sender->Attach({
>description => 'kitten-1',
>ctype => 'image/jpg',
>encoding => 'base64',
>disposition => "inline; 
filename=\"$image\";\r\nContent-ID: ",

>file => "$image"
>});
>  $sender->Close() or die "Close failed! 
$Mail::Sender::Error\n";

>} else {
>die "Cannot send mail: $Mail::Sender::Error\n";}

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Mail::Sender with SSL

2012-08-07 Thread Jeff Pang



I have succeeded in sending mail to my SMTP server with Mail::Sender
without SSL. But now I'm wondering how to do that with SSL, for example,
GMail. After reading the doc, I set TLS_required to 1 when I'm calling
Mail::Sender->new, but nohing works. I tried to debug the program but
found nothing different whether I turn TLS_required on or not.

So how can I send mail with SSL?

BTW, I cannot sill tell SSL from TLS.


use MIME::Lite;
use MIME::Words qw(encode_mimewords);
use Net::SMTP::SSL;
BEGIN { @MIME::Lite::SMTP::ISA = qw(Net::SMTP::SSL); }

The others are almost the same as MIME::Lite.

--
http://liren188.taobao.com/

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Mail::Sender with SSL

2012-08-07 Thread Chris Nehren
On Tue, Aug 07, 2012 at 17:38:57 + , Thomas Dean wrote:
> Hi there,
> 
> I have succeeded in sending mail to my SMTP server with Mail::Sender
> without SSL. But now I'm wondering how to do that with SSL, for example,
> GMail. After reading the doc, I set TLS_required to 1 when I'm calling
> Mail::Sender->new, but nohing works. I tried to debug the program but
> found nothing different whether I turn TLS_required on or not.

You should look at Email::Sender::SMTP::TLS instead--it's the de facto,
mature way of sending email through TLS SMTP servers with perl, and is
actively supported. Mail::Sender reinvents a lot of wheels, poorly, as
you are finding.

Also avoid the MIME::Lite suggestion posted, as that module is
deprecated and not recommended for new code due to the vagaries and odd
bugs in it--also due to the fact that it's not actively maintained or
developed any more and just receives an occasional bug fix.

-- 
Chris Nehren   | Coder, Sysadmin, Masochist
Shadowcat Systems Ltd. | http://shadowcat.co.uk/


pgpPiAnIglL4G.pgp
Description: PGP signature


Re: Mail::Sender with SSL

2012-08-07 Thread Thomas Dean
On Tue, 2012-08-07 at 10:05 -0400, Chris Nehren wrote:
> On Tue, Aug 07, 2012 at 17:38:57 + , Thomas Dean wrote:
> > Hi there,
> > 
> > I have succeeded in sending mail to my SMTP server with Mail::Sender
> > without SSL. But now I'm wondering how to do that with SSL, for example,
> > GMail. After reading the doc, I set TLS_required to 1 when I'm calling
> > Mail::Sender->new, but nohing works. I tried to debug the program but
> > found nothing different whether I turn TLS_required on or not.
> 
> You should look at Email::Sender::SMTP::TLS instead--it's the de facto,
> mature way of sending email through TLS SMTP servers with perl, and is
> actively supported. Mail::Sender reinvents a lot of wheels, poorly, as
> you are finding.
> 
> Also avoid the MIME::Lite suggestion posted, as that module is
> deprecated and not recommended for new code due to the vagaries and odd
> bugs in it--also due to the fact that it's not actively maintained or
> developed any more and just receives an occasional bug fix.
> 

Great, thanks.

Thomas



-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Mail::Sender with SSL

2012-08-07 Thread Jeff Pang



Also avoid the MIME::Lite suggestion posted, as that module is
deprecated and not recommended for new code due to the vagaries and odd
bugs in it--also due to the fact that it's not actively maintained or
developed any more and just receives an occasional bug fix.


what's the better module to handle MIME in today time? thanks.

--
http://liren188.taobao.com/

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Mail::Sender with SSL

2012-08-15 Thread Jenda Krynicky
From: Chris Nehren 
> On Tue, Aug 07, 2012 at 17:38:57 + , Thomas Dean wrote:
> > Hi there,
> > 
> > I have succeeded in sending mail to my SMTP server with Mail::Sender
> > without SSL. But now I'm wondering how to do that with SSL, for example,
> > GMail. After reading the doc, I set TLS_required to 1 when I'm calling
> > Mail::Sender->new, but nohing works. I tried to debug the program but
> > found nothing different whether I turn TLS_required on or not.
> 
> You should look at Email::Sender::SMTP::TLS instead--it's the de facto,
> mature way of sending email through TLS SMTP servers with perl, and is
> actively supported. Mail::Sender reinvents a lot of wheels, poorly, as
> you are finding.

It reinvented a lot of wheels that were not available at the time it 
was written. The fact that there is a specific module now doesn't 
mean it had been available or working under the target operating 
systems always.

Enough plesantries, Tom, what exactly did you try an how exactly did 
it fail?

Jenda


= je...@krynicky.cz === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Mail::Sender with SSL

2012-08-15 Thread Chris Nehren
On Thu, Aug 16, 2012 at 00:05:56 +0200 , Jenda Krynicky wrote:
> From: Chris Nehren 
> > On Tue, Aug 07, 2012 at 17:38:57 + , Thomas Dean wrote:
> > > Hi there,
> > > 
> > > I have succeeded in sending mail to my SMTP server with Mail::Sender
> > > without SSL. But now I'm wondering how to do that with SSL, for example,
> > > GMail. After reading the doc, I set TLS_required to 1 when I'm calling
> > > Mail::Sender->new, but nohing works. I tried to debug the program but
> > > found nothing different whether I turn TLS_required on or not.
> > 
> > You should look at Email::Sender::SMTP::TLS instead--it's the de facto,
> > mature way of sending email through TLS SMTP servers with perl, and is
> > actively supported. Mail::Sender reinvents a lot of wheels, poorly, as
> > you are finding.
> 
> It reinvented a lot of wheels that were not available at the time it 
> was written. The fact that there is a specific module now doesn't 
> mean it had been available or working under the target operating 
> systems always.

Email::Sender is still the right tool to use, and actually works. It
probably sends more mail in a day than you ever will*. As for
your spurious "working under the target operating system always" claim,
Email::Sender::Transport::SMTP::TLS has a flawless CPAN testers report
card, visible here:
http://www.cpantesters.org/distro/E/Email-Sender-Transport-SMTP-TLS.html#Email-Sender-Transport-SMTP-TLS-0.10
The SYNOPSIS provides all (or very nearly all) the code Thomas needs,
with very little tweaking besides configuration. How can it possibly be
easier?

This "use the old, bad tool because it's what the OP started with"
approach leads only to pain and suffering.


* having put it into production at a large ESP that handles thousands of
per day, I'm pretty sure this is the case.

-- 
Chris Nehren   | Coder, Sysadmin, Masochist
Shadowcat Systems Ltd. | http://shadowcat.co.uk/


pgpuC9o648JLO.pgp
Description: PGP signature


Re: Mail::Sender with SSL

2012-08-16 Thread Jenda Krynicky
From: Chris Nehren 
> On Thu, Aug 16, 2012 at 00:05:56 +0200 , Jenda Krynicky wrote:
> > From: Chris Nehren 
> > > On Tue, Aug 07, 2012 at 17:38:57 + , Thomas Dean wrote:
> > > > Hi there,
> > > > 
> > > > I have succeeded in sending mail to my SMTP server with Mail::Sender
> > > > without SSL. But now I'm wondering how to do that with SSL, for example,
> > > > GMail. After reading the doc, I set TLS_required to 1 when I'm calling
> > > > Mail::Sender->new, but nohing works. I tried to debug the program but
> > > > found nothing different whether I turn TLS_required on or not.
> > > 
> > > You should look at Email::Sender::SMTP::TLS instead--it's the de facto,
> > > mature way of sending email through TLS SMTP servers with perl, and is
> > > actively supported. Mail::Sender reinvents a lot of wheels, poorly, as
> > > you are finding.
> > 
> > It reinvented a lot of wheels that were not available at the time it 
> > was written. The fact that there is a specific module now doesn't 
> > mean it had been available or working under the target operating 
> > systems always.
> 
> Email::Sender is still the right tool to use, and actually works. It
> probably sends more mail in a day than you ever will*. 

Having been the basis of the Hotmail service Mail::Sender sent more 
mail you ever will. By order of several magnitudes. Not sure what 
they use now, but they had been using Mail::Sender for several years 
as could have be seen in the mail headers. Several other similar 
services used or use the same module.

> As for
> your spurious "working under the target operating system always" claim,
> Email::Sender::Transport::SMTP::TLS has a flawless CPAN testers report
> card, visible here:
> http://www.cpantesters.org/distro/E/Email-Sender-Transport-SMTP-TLS.html#Email-Sender-Transport-SMTP-TLS-0.10

I can uninvent the wheels I had to invent back in the day because no 
wheels had been available back then or those that were available did 
not work under operating systems I had to support.

The first version of Email::Sender was released 2008-12-10, the first 
version of Mail::Sender was released sometime in 1998! That's ten 
years of CPAN growth!

> The SYNOPSIS provides all (or very nearly all) the code Thomas needs,
> with very little tweaking besides configuration. How can it possibly be
> easier?
> 
> This "use the old, bad tool because it's what the OP started with"
> approach leads only to pain and suffering.
> 
> 
> * having put it into production at a large ESP that handles thousands of
> per day, I'm pretty sure this is the case.

I'm incredibly impressed ...

Jenda
= je...@krynicky.cz === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Mail::Sender and Precedence: bulk

2017-04-21 Thread Gary Stainburn
This is the constructor I (almost) always use when using Mail::Sender.

my $sender=new Mail::Sender {from=>'webmas...@ringways.co.uk',
 reply=>'webmas...@ringways.co.uk',
 headers=>'Precedence: bulk',
 smtp=>'mail.ringways.co.uk',
 fake_from=>'Webmaster '};

(I can't remember why I had to include the fake_from)

I then send the email using something like:

my $resp=$sender->MailFile({to=>$options{email},
subject=>"Available stock Report",
msg=>'Attached is the spreadsheet containing the available stock list',
file=>$fname});

The problem I have is that the headers line doesn't seem to be working as 
there is no Precedence line in the emails received.

This is an old server which hasn't been updated in a while, so I don't think 
anything has been updated for a while, so presumably it hasn't worked for 
ages (if ever).

I've Google'd this and there is nothing out there that I could find on how to 
use the headers argument properly.

Can anyone suggest what I need to change to get it to work.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Mail::Sender ads .dat extension

2003-02-04 Thread Dan Muey
 Hello,
 
I have a script that generates a pdf file from html.
 
It generates it for viewing perfect.
It will email it also.
 
However when I email it a .dat extension is added and it won;t work in Acrobat.
 
If I view the source of the view version and viwe the source of the dat file they seem 
to be identicle.
The html is generated on the fly based on databads enetries and then the pdf code is 
created form that using the program
htmldoc.
 
If I just remove the extension so it's a .pdf file Acrobat still can't read it.
 
Is there any way to specify what the attached file name should be with out it adding 
the .dat ?
What am I missing?
 
Thanks
Dan 
 
Here is my code :
 
# works great
   print "Content-type: application/pdf\n\n";
print $contract_html_pdf;
exit;
 
# works good except for it sends 'Infiniplex.pdf.dat' instead of Infiniplex.pdf
 
   $sender = new Mail::Sender {smtp => "$smtp_serv", from => "$from"};
$sender->OpenMultipart({subject => "$subject", to => "$email_to"});
$sender->Body({
ctype => 'text/plain',
msg => "$text"
});
$sender->Part({
ctype => 'application/pdf',
description => 'Infiniplex.pdf',
disposition => 'attachment',
msg => "$contract_html_pdf"
});
$sender->Close();
 
 
 



Re: Mail Sender in Perl

2003-07-09 Thread Casey West
It was Tuesday, July 08, 2003 when Pablo Fischer took the soap box, saying:
: Hi!
: 
: Im looking for information on how to create my own Mail Sender that connects 
: to a SMTP Server, I found a few sites, so Im looking for more information to 
: start. What do I want? I want to send mails from my perl source to any smtp 
: server not mattering if it's running sendmail, postfix, exim, ms, bla bla.
: 
: Howerver I also found Mail::Sender, but this module doesnt have the enough 
: information so that I can start with it taking like a Mail Sender. Does 
: anybody have more information of Mail::Sender?

Mail::Sender is an option, the easiest module that I've used to send
mail in any form is MIME::Lite.  But if you want to go low level,
close to the SMTP level, try Net::SMTP.  Proper documentation can be
found by the same means you already have for Mail::Sender.


  Casey West

-- 
Shooting yourself in the foot with DBase IV, V1.0 
You pull the trigger, but it turns out that the gun was a poorly
designed hand grenade and the whole building blows up. 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mail Sender in Perl

2003-07-09 Thread Jenda Krynicky
From: Pablo Fischer <[EMAIL PROTECTED]>
> Im looking for information on how to create my own Mail Sender that
> connects to a SMTP Server, I found a few sites, so Im looking for more
> information to start. What do I want? I want to send mails from my
> perl source to any smtp server not mattering if it's running sendmail,
> postfix, exim, ms, bla bla.
> 
> Howerver I also found Mail::Sender, but this module doesnt have the
> enough information so that I can start with it taking like a Mail
> Sender. Does anybody have more information of Mail::Sender?

I have all the information you may want (being the author). I don't 
think I understand what do you need though. What from the docs you 
get when you run
perldoc Mail::Sender
is not clear or what is missing?

You may send emails using Mail::Sender (or MIME::Lite or Net::SMTP) 
to any smtp server. These modules are being used by lots of webmail 
servers so they do have to be able to talk with anything.

Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mail Sender in Perl

2003-07-09 Thread Dan Muey

> Hi!

Howdy

> 
> Im looking for information on how to create my own Mail 
> Sender that connects 
> to a SMTP Server, I found a few sites, so Im looking for more 
> information to 
> start. What do I want? I want to send mails from my perl 
> source to any smtp 
> server not mattering if it's running sendmail, postfix, exim, 
> ms, bla bla.
> 
> Howerver I also found Mail::Sender, but this module doesnt 
> have the enough 

Really? I use it all the time to send pdf attachments to customers and general email.
It awesome and easy (Thanks again Jenda!)

Now if you want to use it to relay mail off a server that won't let 
you relay ( IE most every server besides the one the script's server/ISP uses) 
then it won't work , but that has nothing to do with Mail::Sender or Perl. 
You wouldn't be able to use it to send a message with your mail client either. 
IE it's not a spam machine unles sthe server allows relaying.

Check out the perldoc and cpan about it.

What are you trying to do?

HTH

DMuey

> information so that I can start with it taking like a Mail 
> Sender. Does 
> anybody have more information of Mail::Sender?
> 
> Thanks :-)

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mail Sender in Perl

2003-07-09 Thread Jenda Krynicky
Subject:RE: Mail Sender in Perl
From: "Dan Muey" <[EMAIL PROTECTED]>
> Now if you want to use it to relay mail off a server that won't let
> you relay ( IE most every server besides the one the script's
> server/ISP uses) then it won't work , but that has nothing to do with
> Mail::Sender or Perl. You wouldn't be able to use it to send a message
> with your mail client either. IE it's not a spam machine unles sthe
> server allows relaying.

Actually if this is the problem then Mail::Sender might have a 
solution. Some servers do require that you authenticate with them 
before they allow you to send any messages to nonlocal addresses and 
some of the used protocols are suported by Mail::Sender. See the 
AUTHENTICATION section in Mail::Sender's docs.

Jenda
P.S.: You are welcome Dan :-)
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Help with Mail::Sender package

2001-08-10 Thread Ajit Tawde

I am using ActiveState perl on Windows NT 4.0 platform. I want to send emails with 
attachments. I have downloaded package Sender.pm and copied it to my c:\perl\lib\mail 
folder. Do I need to do anything special to install it ?
When I use it in the following script :

   use Mail::Sender;
 
$sender = new Mail::Sender {smtp => 'snowwhite.bostednt.com', from => 
'[EMAIL PROTECTED]'};
$sender->MailFile({to => '[EMAIL PROTECTED]', subject => 'Here is the file', 
   msg => "I'm sending you the list you wanted.", 
  file => "c:\\ajit\\perl\\scratchpad.pl"});
exit;

The script hangs, the control never comes back. Please tel me what I am doing wrong ?

Thanks,

Ajit Tawde





Re: Help using Mail::Sender

2002-01-13 Thread Eric Beaudoin

At 16:20 2002.01.13, Arthur Perley wrote:
>Im trying to use the Perl module Mail::Sender to send email through SMTP.
>It works great for local domains but when I try to use it for extranet
>domains I get an error:
>[Local user "'[EMAIL PROTECTED]'" unknown on host "mail.myhost.com"]
>This isn't the way it's supposed to work, AFAIK.
>
>I'm on Win2K using SMTP from Rockliffe MailSite 4.5.6 and Perl v5.6.1 (build
>630) for MSWin32-x86-multi-thread.
>I have security configured for no relay allowed, and Auth ETRN but even
>disabled the error occurs.
>
>Any help is appreciated. The test code follows.
>
>Thanks
>Arthur
>
>Documentation is here:
>http://search.cpan.org/doc/JENDA/Mail-Sender-0.7.10/Sender.pm.html
>
>#BOF
># Using Mail::Sender - module for sending mails with/without attachments
>through an SMTP server
>
>use Mail::Sender;
> ref ($sender = new Mail::Sender({from => '[EMAIL PROTECTED]',
>    smtp => 'mail.myhost.com'})) or die "$Mail::Sender::Error\n";
>
>(ref ($sender->MailMsg({to =>'[EMAIL PROTECTED]',
>   subject => 'Mail::Sender test',
>   msg => "You,\n This is a Mail::Sender test."}))
>  and print "Mail sent OK.") or die "$Mail::Sender::Error\n";
>
>#EOF

Your SMTP doesn't want to relay to yourhost.com because (I'm guessing) it is not a 
valid address (no MX record available on the DNS for the yourhost.com domain). 

You might want to try using your ISP SMTP server and a real address to see if the 
problem is with your script or your SMTP server.

BTW, if your SMTP server is configured for no relay from outside your network, you 
will also have to use a valid From: address. Otherwise your SMTP server will bounce 
your address with a "Do not relay" type of error message.

Hope it helps.


---
Éric Beaudoin<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Mail::Sender - authentication + design questions

2002-03-25 Thread Jenda Krynicky

I would like to get some input from the general public on a few 
issues with Mail::Sender.

1) Will anyone mind if the SendX() methods will return the 
Mail::Sender object instead of the 1 they used to?

This would allow chaining the method calls like this :

eval {
(new Mail::Sender)
->OpenMultipart({...})
->Body(...)
->SendEnc(...)
->Part(...)
->SendEnc(...)
->Attach(...)
->Close();
}
if ($@ =~ /^Can't call method/) {
    die "Cannot send mail : $Mail::Sender::Error\n"
} elsif ($@) {
die $@,"\n";
}

2) There is a beta version that contains code for the SMTP 
authentication at http://Jenda.Krynicky.cz/Sender.pm . Currently 
the only supported protcols are LOGIN, PLAIN and CRAM-DM5, 
but it should be relatively easy to add other. Especialy if anyone 
sends me a snipet of code that implements them ;-)

There is no documentation on the feature yet and the interface is 
not yet fixed (yes, THIS is the question). In the beta the new 
Mail::Sender constructor and the Open, OpenMultipart, MailMsg 
and MailFile methods accepts three new parameters :

auth => the name of the protocol. Only supports LOGIN, PLAIN
 and CRAM-MD5 now.
username => ...
password => ...

I wonder whether to use "username" and "password" or "authid" 
and "authpwd" or something else ...

I do not have access to any server that would implement PLAIN 
and CRAM-MD5 so could someone test it and let me know? Or 
create for me a temporary test account on such a server if there 
are problems so that I could test?

Thanks for opinions, suggestions, bug and success reports and 
code snipets.

Jenda

=== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain
I can't find it.
--- me

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Need help with Mail::Sender

2009-06-26 Thread Bob McConnell
From: Dennis Wicks

> Following the docs I have it working, somewhat, but it is
> not handling html w/inline images correctly.
> 
> Instead of getting an html message with inline image it is
> sending a blank email with both the html and the jpg image
> as attachments.
> 
> Here is my program. Does anyone see the problem?

Your problem appears to be that it is following the standards. RFC 2822
states the email body must be sent as plain text. Everything else has to
be in attachments.

The way I see it is that you are lacking the required body, defined by
some software as the alternate text, even though it is the primary
message content.

Bob McConnell

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Need help with Mail::Sender

2009-06-26 Thread Jenda Krynicky
Date sent:  Thu, 25 Jun 2009 23:27:24 -0500
From:   Dennis Wicks 
To: Perl Beginners 
Subject:Need help with Mail::Sender

> Greetings;
> 
> Following the docs I have it working, somewhat, but it is
> not handling html w/inline images correctly.
> 
> Instead of getting an html message with inline image it is
> sending a blank email with both the html and the jpg image
> as attachments.
> 
> Here is my program. Does anyone see the problem?

Yes, the problem is very simple. Each mail client handles this 
differently. What works in one, fails with the other. This is what 
worked for me in Pegasus Mail:

#!perl
use Mail::Sender;

eval {
(new Mail::Sender)
->OpenMultipart({
to => 'je...@krynicky.cz,je...@operamail.com',
subject => 'Embedded Image Test',
boundary => 'boundary-test-1',
type => 'multipart/related',

smtp=> 'xxx',
auth => 'PLAIN',
authid => 'xxx',
authpwd => 'xxx',

})
->Attach({
description => 'html body',
ctype => 'text/html; charset=us-ascii',
encoding => '7bit',
disposition => 'NONE',
file => 'c:\temp\zk.html'
})
->Attach({
description => 'Test gif',
ctype => 'image/gif',
encoding => 'base64',
    disposition => "inline; 
filename=\"test.gif\";\r\nContent-ID: 
",
file => 'D:\pix\humor\alc.jpg'
})
->Close()
}
or die "Cannot send mail: $Mail::Sender::Error\n";
__END__

and the c:\temp\zk.html contained:



hi again



Ende





If I send the email to my operamail account, the HTML is in the body, 
but the image doesn't display correctly.

Try to change the headers or try to post a HTML email with images 
with your mail client and see what headers does that use.

Jenda
= je...@krynicky.cz === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Need help with Mail::Sender

2009-06-26 Thread Dermot
2009/6/26 Jenda Krynicky :
 This is what
> worked for me in Pegasus Mail:

It's good to know there are still a few pmail users out there :)

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Need help with Mail::Sender

2009-06-26 Thread Gurunandan R. Bhat
In my limited experience, I have had no issues with
Email::MIME::CreateHTML. It also creates an object that Email::Sender
can deliver. Do try it.

REgards
Gurunandan



On Fri, 2009-06-26 at 17:36 +0200, Jenda Krynicky wrote:


> Yes, the problem is very simple. Each mail client handles this 
> differently. What works in one, fails with the other. This is what 
> worked for me in Pegasus Mail:
> 
> #!perl
> use Mail::Sender;
> 
> eval {
> (new Mail::Sender)
>   ->OpenMultipart({






Re: Need help with Mail::Sender

2009-07-01 Thread Dennis Wicks

Jeff Chimene wrote the following on 06/26/2009 10:14 AM:

I don't see glaringly wrong with it off the top of my head.

You might try some things:

   * Split the 'content_id' value into its own parameter
   * Let Mail::Sender supply the "boundary" parameter
   * Employ the 'debug' parameter in the object create call & write a log

I've been using Mail::Sender for > 7 yrs & found it quite 
bullet-proof. I do recall that it was a bitch to get everything 
working. I use it to send attachments as well as inline images



ref $sender->Attach({description => $description
 , 
ctype => 'image/jpeg'
 , 
encoding => 'base64'
 , 
disposition => sprintf('inline;filename="%s/%s";', $path[$#path - 1], 
$path[$#path])
 , 
file => $imagepath.$path[$#path]
     , 
content_id => $k}) or die "Cannot send file as a separate part of 
mail message: $Mail::Sender::Error";


Thanks, Jeff, but the attachment isn't the problem. It seems to be the 
body.


In my case both the attachment and the body are treated as attachments
and the body is empty.

How do you put the body into your emails?

Thanks,
Dennis

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Mail::Sender ads .dat extension

2003-02-05 Thread Jenda Krynicky
From: "Dan Muey" <[EMAIL PROTECTED]>
> I have a script that generates a pdf file from html.
> 
> It generates it for viewing perfect.
> It will email it also.
> 
> However when I email it a .dat extension is added and it won;t work in
> Acrobat.

I bet it's the mail client who adds the .dat extension, not 
Mail::Sender.
 
> If I view the source of the view version and viwe the source of the
> dat file they seem to be identicle. The html is generated on the fly
> based on databads enetries and then the pdf code is created form that
> using the program htmldoc.
> 
> If I just remove the extension so it's a .pdf file Acrobat still can't
> read it.
> 
> Is there any way to specify what the attached file name should be with
> out it adding the .dat ? What am I missing?
> 
> Thanks
> Dan 
> 
> Here is my code :
> 
> # works great
>print "Content-type: application/pdf\n\n";
> print $contract_html_pdf;
> exit;
> 
> # works good except for it sends 'Infiniplex.pdf.dat' instead of
> # Infiniplex.pdf
> 
>$sender = new Mail::Sender {smtp => "$smtp_serv", from =>
>"$from"};
> $sender->OpenMultipart({subject => "$subject", to =>
> "$email_to"}); $sender->Body({
> ctype => 'text/plain',
> msg => "$text"
> });
> $sender->Part({
> ctype => 'application/pdf',
> description => 'Infiniplex.pdf',
> disposition => 'attachment',

disposition => 'attachment; filename=Infiniplex.pdf',
encoding => 'Base64',

> msg => "$contract_html_pdf"
> });
> $sender->Close();

You should specify the filename inside the disposition header.
The mail client aparently uses the description to create a name of 
the file if you don't and appends .dat to specify it doesn't really 
know what type of file it is.
Second problem is that the default encoding for ->Part() is 7BIT. 
Which basicaly means "Don't encode the data and hope for best". PDF 
is a binary format so you should use Base64 encoding to ensure it 
will get through fine.

HTH, Jenda
P.S.: One more thing to add to the docs, right ? :-)
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Mail::Sender ads .dat extension

2003-02-05 Thread Dan Muey
That was exactly it! Works like a bandit!

Thank you so much Jenda, I owe you one, actually more like two or three.
Your module rocks!

Genius of the day goes to you today!!

Dan
> 
> 
> From: "Dan Muey" <[EMAIL PROTECTED]>
> > I have a script that generates a pdf file from html.
> > 
> > It generates it for viewing perfect.
> > It will email it also.
> > 
> > However when I email it a .dat extension is added and it 
> won;t work in 
> > Acrobat.
> 
> I bet it's the mail client who adds the .dat extension, not 
> Mail::Sender.
>  
> > If I view the source of the view version and viwe the source of the 
> > dat file they seem to be identicle. The html is generated 
> on the fly 
> > based on databads enetries and then the pdf code is created 
> form that 
> > using the program htmldoc.
> > 
> > If I just remove the extension so it's a .pdf file Acrobat 
> still can't 
> > read it.
> > 
> > Is there any way to specify what the attached file name 
> should be with 
> > out it adding the .dat ? What am I missing?
> > 
> > Thanks
> > Dan
> > 
> > Here is my code :
> > 
> > # works great
> >print "Content-type: application/pdf\n\n";
> > print $contract_html_pdf;
> > exit;
> > 
> > # works good except for it sends 'Infiniplex.pdf.dat' instead of # 
> > Infiniplex.pdf
> > 
> >$sender = new Mail::Sender {smtp => "$smtp_serv", from =>
> >"$from"};
> > $sender->OpenMultipart({subject => "$subject", to =>
> > "$email_to"}); $sender->Body({
> > ctype => 'text/plain',
> > msg => "$text"
> > });
> > $sender->Part({
> > ctype => 'application/pdf',
> > description => 'Infiniplex.pdf',
> > disposition => 'attachment',
> 
>   disposition => 'attachment; filename=Infiniplex.pdf',
>   encoding => 'Base64',
> 
> > msg => "$contract_html_pdf"
> > });
> > $sender->Close();
> 
> You should specify the filename inside the disposition 
> header. The mail client aparently uses the description to 
> create a name of 
> the file if you don't and appends .dat to specify it doesn't really 
> know what type of file it is.
> Second problem is that the default encoding for ->Part() is 7BIT. 
> Which basicaly means "Don't encode the data and hope for best". PDF 
> is a binary format so you should use Base64 encoding to ensure it 
> will get through fine.
> 
> HTH, Jenda
> P.S.: One more thing to add to the docs, right ? :-)
> = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
> When it comes to wine, women and song, wizards are allowed 
> to get drunk and croon as much as they like.
>   -- Terry Pratchett in Sourcery
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Help with Mail::Sender package

2001-08-19 Thread SunDog

Hi Ajit,

This post for help with Mail::Sender package ... seems to have
gone unanswered for sometime now ... unless I've
missed a post and/or someone has replied directly 
to you missing the list ...

Anyway, this is exactly the kind of PERL application that
gives Integrity to this open source tool as being
High Level ... using it in this fashion at least to
send email based on user defined conditions is critical
to Chaining technoligies and Automated processes ...

So, needing something like this myself ... KINTANA wouldn't
do it ... (very expensive application though)
I don't mind working thru this with you.

Firstly,  the code snippet you provided looks to be verbatim
from the example in Jenda Krynicky's help file on the Sender.pm
module she has written. You've made the custom changes to the
from and to email addresses and that looks OK,

From my own experience, I started with the same plan ... however,
I needed to add the following line to tell the ActiveState perl
installation 
the source directory I'm using to look for the Sender.pm 

I used something like this:

BEGIN {unshift(@INC, "./Mail");}

# Each entry in the @INC array is a directory that Perl searches to
locate the module.
# Adding a BEGIN statement to the code updates the @INC array.

Additionaly, check the smtp server your using  and make sure you're
connected 
and on-line ...

Give this a try and good luck

SunDog

===

At 09:49 AM 8/10/01 -0400, you wrote:
>I am using ActiveState perl on Windows NT 4.0 platform. I want to send 
>emails with attachments. I have downloaded package Sender.pm and copied it 
>to my c:\perl\lib\mail folder. Do I need to do anything special to install
it ?
>When I use it in the following script :
>
>   use Mail::Sender;
> 
>$sender = new Mail::Sender {smtp => 'snowwhite.bostednt.com', from 
>=> '[EMAIL PROTECTED]'};
>$sender->MailFile({to => '[EMAIL PROTECTED]', subject => 'Here is 
>the file', 
>   msg => "I'm sending you the list you wanted.", 
>  file => "c:\\ajit\\perl\\scratchpad.pl"});
>exit;
>
>The script hangs, the control never comes back. Please tel me what I am 
>doing wrong ?
>
>Thanks,
>
>Ajit Tawde
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Mail::Sender on WinNT - can't connect

2002-02-15 Thread murphy, daniel (BMC Eng)

I've been wanting to send mail from some of my scripts, so I thought I'd see
how to get it to work. 

I chose to use Mail::Sender and am running Perl 5.005_03 from ActiveState
build 522 (I know, it's old) on WinNT. When I run this simple test script:

use Mail::Sender;

ref ($sender = new Mail::Sender
{smtp => 'srmontana',
from => '[EMAIL PROTECTED]'})
or die "$Mail::Sender::Error\n";

ref ($sender->MailMsg({to => '[EMAIL PROTECTED]',
subject => 'Here is the file',
    msg => "I'm sending you the list you wanted."})),
or die "$Mail::Sender::Error\n";

--

I get,

connect() failed: Unknown error



I'm not sure that this is a Perl question as much as it's a WinNT Exchange
Server, corporate environment and configuration question. This is a large
company and I use an Outlook email client. Looking at the Tools:Services
panel of Outlook, I got 'srmontana' as the name of the Exchange server. I
have also tried various combinations of these lines:

client => 'MURPHY5344A',
from => 'murphy, daniel (BMC Eng)'

 but, to no avail - I still get the connect() error.

I know the name 'srmontana' is being resolved correctly because I printed
out the smtpaddr and got the correct IP address.


Do things look right?
Is there some type of authentication, (userid, password, etc.) that's taking
place? There must be, right?

TIA,

Dan Murphy



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender and Precedence: bulk [solved]

2017-04-21 Thread Gary Stainburn
Sorry to both you all. As usual, having posted asking for help I've managed to 
find the answer.  

In stripping out all the bits that I thought were not required to make this 
post I spotted the syntax error that was causing the issue.

By putting the code exactly as shown into a dummy program it worked fine. By 
fixing the syntax errors the original program now also works.

Gary

On Friday 21 April 2017 09:46:07 Gary Stainburn wrote:
> This is the constructor I (almost) always use when using Mail::Sender.
>
> my $sender=new Mail::Sender {from=>'webmas...@ringways.co.uk',
>  reply=>'webmas...@ringways.co.uk',
>  headers=>'Precedence: bulk',
>  smtp=>'mail.ringways.co.uk',
>  fake_from=>'Webmaster '};
>
> (I can't remember why I had to include the fake_from)
>
> I then send the email using something like:
>
> my $resp=$sender->MailFile({to=>$options{email},
> subject=>"Available stock Report",
> msg=>'Attached is the spreadsheet containing the available stock list',
> file=>$fname});
>
> The problem I have is that the headers line doesn't seem to be working as
> there is no Precedence line in the emails received.
>
> This is an old server which hasn't been updated in a while, so I don't
> think anything has been updated for a while, so presumably it hasn't worked
> for ages (if ever).
>
> I've Google'd this and there is nothing out there that I could find on how
> to use the headers argument properly.
>
> Can anyone suggest what I need to change to get it to work.



-- 
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk 

https://fundraise.cancerresearchuk.org/page/garys-march-march

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Mail::Sender Problem. Can Some Help Me?

2002-11-08 Thread Palm Optins
Hello Everyone,

I setting up a list mailer using mysql and mail::Sender.
The mailer uses Subscribed email address and Contact Address.

The mail is suppose to go to the subscribe address. For some reason. It keeps going to 
the contact address.

The code I'm using is below. I tried changing the   $new_contact = 
$pointer->{"Contact"};
to  $new_subscribe = $pointer->{"Subscribe"}; and $ito = $new_contact; to $ito = 
$new_subscribe;

When I make this change I can't get the mail to go to the subscribed address.
I've tried everything to get this to mail. Can someone tell me what I'm doing wrong?


Here's the way I bought the script. It's written like this.

$iwhere = "";
if ($type1 eq "FREE") { $iwhere = " WHERE Type = 'FREE'"; }

@fields = 
(Username,Subscribe,Name,Password,Contact,Type,Vacation,Status,Date,Extra1,Extra2,Extra3);
&Db_Connect;
$SQL = "SELECT * FROM safelist".$iwhere;
&Go_SQL;
while ($pointer = $sth->fetchrow_hashref) {
   foreach $field (@fields) {
#  foreach $field (@fields) {
 $new_username = $pointer->{"Username"};
 $new_contact = $pointer->{"Contact"};
 $new_type = $pointer->{"Type"}; }

 $mline = "==";
 $msg = "$message\n\n".
 "$mline\n".
 "$email_note\n\n".
 "$login_url\n".
 "Click Here to Login\n".
 "$mline\n";

$ifrom = $name1.  "<".$sub1.">";
$ito = $new_contact;
$isubject = $subject;


 use Mail::Sender;
 ref ($sender = new Mail::Sender({from => $ifrom,smtp => $smtp_server})) or die 
"$Mail::Sender::Error\n";
 (ref ($sender->MailMsg({to =>$ito, subject => $isubject, msg => $msg}))
  and print ""
 )
 or die "$Mail::Sender::Error\n";
   }


My stupidity! (WAS RE: Mail::Sender weirdness)

2003-12-30 Thread Dan Muey
> > > The thing is I get "Sending...Done" everytime but never a
> > dleivery and
> > > no hinf tof it in the logs. On one server I needed to use smtp 
> > > authentication but that set $@ and said connection

This part of it was completely stupid on my part:

I was doing if($@) { ...

I added if($@ || $Mail::Sender::Error) { ...

And guess what? It gave me the error message. Duh, what a moron!

So now it said "Connection not established" for 
the local sending to remote, which I would think would 
be the easiest one, especially since:

Local to local is ok.
Remote to local is ok.
I'm not doing any remote to remote.

But authentication made my mail servers start sending it but I'm still not sure why my 
mail server would insist on authentication in one case but not the other.

Oh well, whaddayado!

Dan

> couldn't be made.
> > > 
> > > Any ideas what I'm missing would be awesome!
> > 
> > By default Mail::Sender does not raise exceptions. It returns 
> > negative error codes.
> > 
> 
> Right on! I'll take a look at your cpan page again and redo
> my problem handling angle.
> 
> As usual you rock!
> 
> > Jenda

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




RE: Mail::Sender on WinNT - can't connect

2002-02-15 Thread Nikola Janceski

shouldn't your smtp parameter have the full hostname?
You should also check that your server is accepting smtp connections from
the user and machine your are running this script on.

-Original Message-
From: murphy, daniel (BMC Eng) [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 9:51 AM
To: '[EMAIL PROTECTED]'
Subject: Mail::Sender on WinNT - can't connect


I've been wanting to send mail from some of my scripts, so I thought I'd see
how to get it to work. 

I chose to use Mail::Sender and am running Perl 5.005_03 from ActiveState
build 522 (I know, it's old) on WinNT. When I run this simple test script:

use Mail::Sender;

ref ($sender = new Mail::Sender
{smtp => 'srmontana',
from => '[EMAIL PROTECTED]'})
or die "$Mail::Sender::Error\n";

ref ($sender->MailMsg({to => '[EMAIL PROTECTED]',
subject => 'Here is the file',
msg => "I'm sending you the list you wanted."})),
or die "$Mail::Sender::Error\n";

--

I get,

connect() failed: Unknown error



I'm not sure that this is a Perl question as much as it's a WinNT Exchange
Server, corporate environment and configuration question. This is a large
company and I use an Outlook email client. Looking at the Tools:Services
panel of Outlook, I got 'srmontana' as the name of the Exchange server. I
have also tried various combinations of these lines:

client => 'MURPHY5344A',
from => 'murphy, daniel (BMC Eng)'

. but, to no avail - I still get the connect() error.

I know the name 'srmontana' is being resolved correctly because I printed
out the smtpaddr and got the correct IP address.


Do things look right?
Is there some type of authentication, (userid, password, etc.) that's taking
place? There must be, right?

TIA,

Dan Murphy



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Mail::Sender on WinNT - can't connect

2002-02-15 Thread Jenda Krynicky

From:   "murphy, daniel (BMC Eng)" <[EMAIL PROTECTED]>

> I've been wanting to send mail from some of my scripts, so I thought
> I'd see how to get it to work. 
> 
> I chose to use Mail::Sender and am running Perl 5.005_03 from
> ActiveState build 522 (I know, it's old) on WinNT. When I run this
> simple test script:
> 
> use Mail::Sender;
> 
> ref ($sender = new Mail::Sender
> {smtp => 'srmontana',
> from => '[EMAIL PROTECTED]'})
> or die "$Mail::Sender::Error\n";
> 
> --
> 
> I get,
> 
> connect() failed: Unknown error

Does that server accept SMTP ?

If you try
telnet srmontana 25
do you connect and get a reply something like:
220 srmontana.emc.com MS Exchange ESMTP server ready.

If not you'll have to find another server to relay the mail for you.

> Do things look right?

Yes.

> Is there some type of authentication, (userid, password, etc.) that's
> taking place? There must be, right?

If the server requires authentication then you cannot use 
Mail::Sender. Except if it requires "POP3 before SMTP" or 
whatever is it called ... in that case you'd have to connect and log 
into the server using Mail::POP3Client or Net::POP3 and then 
connect with Mail::Sender.

Maybe you could try either Win32::MAPI or use Win32::OLE to 
control Outlook.

Jenda


=== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
--- me

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Mail::Sender on WinNT - can't connect

2002-02-15 Thread Mark Richmond


As Jenda mentioned your exchange server might not support SMTP. You may
also run into mail relay problems with exchange if you don't
authenticate with a DOMAIN. Also it's very likely that exchange is not
configured to relay outside the company. For simple mail messages I use
Mail::Sendmail 


# Exchange relays this fine INSIDE the company which is all I need 

use Mail::Sendmail;
$mail{Smtp}   = 'mailserver'; # override sendmail.pm 
my $domain=  'yourdomain.com' 
my $user  = 'your name' 

$mail{From}   = "$user\@$domain" ; 
$mail{To} = "$user\@$domain" ; 
$mail{Subject} = "Test Mail" ;

$mail{Message} = "foo";
$mail{Message} .= "bar \n";

sendmail %mail ; 
if ($Mail::Sendmail::error) {
print "content of
\$Mail::Sendmail::error:\n$Mail::Sendmail::error\n";
}
exit 0;


> -Original Message-
> From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 15, 2002 10:57 AM
> To: '[EMAIL PROTECTED]'
> Subject: Re: Mail::Sender on WinNT - can't connect
> 
> 
> From: "murphy, daniel (BMC Eng)" 
> <[EMAIL PROTECTED]>
> 
> > I've been wanting to send mail from some of my scripts, so I thought
> > I'd see how to get it to work. 
> > 
> > I chose to use Mail::Sender and am running Perl 5.005_03 from
> > ActiveState build 522 (I know, it's old) on WinNT. When I run this
> > simple test script:
> > 
> > use Mail::Sender;
> > 
> > ref ($sender = new Mail::Sender
> > {smtp => 'srmontana',
> > from => '[EMAIL PROTECTED]'})
> > or die "$Mail::Sender::Error\n";
> > 
> > --
> > 
> > I get,
> > 
> > connect() failed: Unknown error
> 
> Does that server accept SMTP ?
> 
> If you try
>   telnet srmontana 25
> do you connect and get a reply something like:
>   220 srmontana.emc.com MS Exchange ESMTP server ready.
> 
> If not you'll have to find another server to relay the mail for you.
> 
> > Do things look right?
> 
> Yes.
> 
> > Is there some type of authentication, (userid, password, 
> etc.) that's
> > taking place? There must be, right?
> 
> If the server requires authentication then you cannot use 
> Mail::Sender. Except if it requires "POP3 before SMTP" or 
> whatever is it called ... in that case you'd have to connect and log 
> into the server using Mail::POP3Client or Net::POP3 and then 
> connect with Mail::Sender.
> 
> Maybe you could try either Win32::MAPI or use Win32::OLE to 
> control Outlook.
> 
> Jenda
> 
> 
> === [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
> There is a reason for living. There must be. I've seen it somewhere.
> It's just that in the mess on my table ... and in my brain.
> I can't find it.
>   --- me
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Mail::Sender on WinNT - can't connect

2002-02-15 Thread murphy, daniel (BMC Eng)

> 
> I get,
> 
> connect() failed: Unknown error


Jenda said:

Does that server accept SMTP ?

If you try
telnet srmontana 25
do you connect and get a reply something like:
220 srmontana.emc.com MS Exchange ESMTP server ready.

If not you'll have to find another server to relay the mail for you.



Aha, I tried telnet'ing to port 25 a few ways and got rejected, so
apparently this server doesn't accept SMTP, right?

So it looks like it's an internal issue rather than Perl. I'll have to ask
around to see what my options are.

Thanks,

Dan
  

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




MIME encoding and Mail::Sender (was: Sending email ...)

2009-03-04 Thread Gunnar Hjalmarsson
The discussion in this thread made me realize that I'd better update my 
own mail related module, CGI::ContactForm, as regards MIME encoding. An 
updated version has been uploaded to CPAN.


http://search.cpan.org/dist/CGI-ContactForm/

On February 24, 2009 Octavian Râsnita wrote:
Mail::Sender doesn't encode the headers to UTF-8 and we would need to do 
that MIME encoding explicitly which is something I wouldn't like.


It's not that difficult. The key code I used in CGI::ContactForm is a 
function named mimeencode(). This code illustrates how a header is being 
prepared before it's passed to Mail::Sender:


use MIME::QuotedPrint;

my $subject = 'Smörgåsbord';
$subject = mimeencode($subject, 'UTF-8');
print "$subject\n";

sub mimeencode {
my ($str, $enc) = @_;
return $str unless $str =~ /[[:^ascii:]]/;
my @parts;
while ( $str =~ /(.{1,40}.*?(?:\s|$))/g ) {
my $part = $1;
push @parts, MIME::QuotedPrint::encode($part, '');
}
join "\r\n\t", map { "=?$enc?Q?$_?=" } @parts;
}

The resulting output is:

=?UTF-8?Q?Sm=C3=B6rg=C3=A5sbord?=

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Mail::Sender Problem. Can Some Help Me?

2002-11-10 Thread Jenda Krynicky
From: "Palm Optins" <[EMAIL PROTECTED]>
> The code I'm using is below. I tried changing the   $new_contact =
> $pointer->{"Contact"}; to  $new_subscribe = $pointer->{"Subscribe"};
> and $ito = $new_contact; to $ito = $new_subscribe;
> 
> When I make this change I can't get the mail to go to the subscribed
> address. I've tried everything to get this to mail. Can someone tell
> me what I'm doing wrong?

God knows. Try to print out the parameters you pass to ->Open().

> Here's the way I bought the script. It's written like this.
> 

(I had to reformat it to get anywhere. Please read the included 
comments!)

> $iwhere = "";
> if ($type1 eq "FREE") { $iwhere = " WHERE Type = 'FREE'"; }
> 
> @fields = (Username,Subscribe,Name,Password,Contact,Type,Vacation,
>   Status,Date,Extra1,Extra2,Extra3); 

This should be

@fields = qw(Username Subscribe Name Password Contact Type Vacation
   Status Date Extra1 Extra2 Extra3); 

or

@fields = 
('Username','Subscribe','Name','Password','Contact','Type','Vacation',
  'Status','Date','Extra1','Extra2','Extra3'); 

What you did was dangerous. If you ever defined a function named 
Name() or Type() or any other word mentioned above your script would 
break. You should NOT forget to enclose your string constants in 
quotes.
And you should
use strict;
on top of your scripts.

> &Db_Connect; 
> 
> $SQL = "SELECT * FROM safelist".$iwhere;
> 
> &Go_SQL; 
> 
> while ($pointer = $sth->fetchrow_hashref) {
>   foreach $field (@fields) {
>   $new_username = $pointer->{"Username"};
>   $new_contact = $pointer->{"Contact"};
>   $new_type = $pointer->{"Type"};
>   }

Why are you looping? Nothing in the loop body depends on the loop 
variable $field !

>   $mline = 
"=
=";

It would be better to write:

    $mline = "=" x 70;

>   $msg = "$message\n\n"."$mline\n". "$email_note\n\n". 
"$login_url\n"
>   . "Click Here to Login\n". "$mline\n";

$msg = <<"*END*";
$message

$mline
$email_note

$login_url
Click Here to Login
$mline
*END*

>   $ifrom = $name1.  "<".$sub1.">";
>   $ito = $new_contact;
>   $isubject = $subject;
>   
>   use Mail::Sender;

IMHO It's not good to place use tstatements into loops or if(){}s. 
They will still be executed before the script starts running and will 
only be executed once. Therefore this may be misleading.

>   ref ($sender = new Mail::Sender({from => $ifrom,smtp => 
$smtp_server}))
>   or die "$Mail::Sender::Error\n";

Why don't you create the object outside the loop and then reuse it? 
That's why it's an object!

>   (ref ($sender->MailMsg({to =>$ito, subject => $isubject, msg => 
$msg}))
>   and print ""

Why the print() statement? It doesn't print anything (unless you 
fiddled with variable $\).

>   )
>   or die "$Mail::Sender::Error\n";
> }

HTH, Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: My stupidity! (WAS RE: Mail::Sender weirdness)

2003-12-30 Thread Daniel Staal
--As off Tuesday, December 30, 2003 11:58 AM -0600, Dan Muey is 
alleged to have said:

So now it said "Connection not established" for
the local sending to remote, which I would think would
be the easiest one, especially since:
Local to local is ok.
Remote to local is ok.
I'm not doing any remote to remote.
But authentication made my mail servers start sending it but I'm
still not sure why my  mail server would insist on authentication
in one case but not the other.
--As for the rest, it is mine.

They are doing the Right Thing and not being an open relay. 
Basically the server says *one* of the persons involved has to be 
known to it.  If the email is for a local user it knows that person. 
If it isn't, you have to authenticate as someone it knows.  Otherwise 
Joe Spammer can come and ask the server to please deliver these 10k 
messages to random people.

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



RE: My stupidity! (WAS RE: Mail::Sender weirdness)

2003-12-30 Thread Dan Muey
>
> 
> They are doing the Right Thing and not being an open relay. 
> Basically the server says *one* of the persons involved has to be 

In both cases one is always a local user. But only in one case is authentication 
required.

> known to it.  If the email is for a local user it knows that person. 
> If it isn't, you have to authenticate as someone it knows.  Otherwise 
> Joe Spammer can come and ask the server to please deliver these 10k 
> messages to random people.

Right, but my question is why do I need to authenticate local 
to remote and not remote to local not why do I have to authenticate at all.
I'm well aware of the spam relay fun! :)

I could spam all the local users as [EMAIL PROTECTED] 
all day long without any knowledge of there settings.
So I guess, why not authenticate both ways? Just a pondering, no big 
deal since they'd have to get a scirpt on the server and that'd 
make them trackable pretty quick.

> Daniel T. Staal

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: My stupidity! (WAS RE: Mail::Sender weirdness)

2003-12-30 Thread Shawn McKinley

[snip]
 
> Right, but my question is why do I need to authenticate local 
> to remote and not remote to local not why do I have to 
> authenticate at all. I'm well aware of the spam relay fun! :)

[snip]

If you are going to authenticate remote to local, that would mean
every email server trying to send mail to your server would have
to authenticate.  I don't know about your mail server, but mine
would have no way of authenticating the 10K+ remote servers a day
that send emails to me or others on that server...

The idea is to prevent relaying.  If the remote is sending to your
local, your server will not relay it to another.

Shawn



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: My stupidity! (WAS RE: Mail::Sender weirdness)

2003-12-30 Thread Dan Muey
 
> [snip]
>  
> > Right, but my question is why do I need to authenticate local
> > to remote and not remote to local not why do I have to 
> > authenticate at all. I'm well aware of the spam relay fun! :)
> 
> [snip]
> 
> If you are going to authenticate remote to local, that would 
> mean every email server trying to send mail to your server 
> would have to authenticate.  I don't know about your mail 
> server, but mine would have no way of authenticating the 10K+ 
> remote servers a day that send emails to me or others on that 
> server...
> 
> The idea is to prevent relaying.  If the remote is sending to 
> your local, your server will not relay it to another.
> 

Got it thanks Shawn.

> Shawn
> 
> 
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: My stupidity! (WAS RE: Mail::Sender weirdness)

2003-12-30 Thread Daniel Staal
--As off Tuesday, December 30, 2003 12:33 PM -0600, Dan Muey is 
alleged to have said:

They are doing the Right Thing and not being an open relay.
Basically the server says *one* of the persons involved has to be
In both cases one is always a local user. But only in one case is
authentication required.
Without authentication, if you are sending, the mail server can't 
tell a local from a remote user.  (It can always tell for receiving: 
it just checks its own delivery tables.)

(There are ways around this.  But they are fairly easy to spoof if 
the mail server is accessible from the internet, and do not work for 
roaming 'local' users or static IP addresses (well, static IPs could 
be used, with a lot of extra work).  Authenication is easier to set 
up and harder to spoof.)

I could spam all the local users as [EMAIL PROTECTED]
all day long without any knowledge of there settings.
So I guess, why not authenticate both ways? Just a pondering, no
big  deal since they'd have to get a scirpt on the server and
that'd  make them trackable pretty quick.
For remote to local: authenticate how?  You don't want to block mail 
coming in from random domains (since you don't know which are spam 
domains and which aren't), so you have to let random people send you 
email.  Otherwise the only email you can handle is local to local, 
and that just isn't very useful.  (Note: joemama is probably a 
registered, legit, and paid-in-full user of remotespamville.com , so 
you can't say people who aren't from that domain.  He *is* from that 
domain.)

And now we are well into anti-spam theology.  (There have been 
several complete systems proposed to handle the 'authenticated guest' 
problem here, none currently is in use.)  And out of Perl. ;-)

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



RE: My stupidity! (WAS RE: Mail::Sender weirdness)

2003-12-30 Thread Dan Muey
> --As off Tuesday, December 30, 2003 12:33 PM -0600, Dan Muey is 
> alleged to have said:
> 
> >> They are doing the Right Thing and not being an open 
> relay. Basically 
> >> the server says *one* of the persons involved has to be
> >
> > In both cases one is always a local user. But only in one case is 
> > authentication required.
> 
> Without authentication, if you are sending, the mail server can't 
> tell a local from a remote user.  (It can always tell for receiving: 
> it just checks its own delivery tables.)
> 
> (There are ways around this.  But they are fairly easy to spoof if 
> the mail server is accessible from the internet, and do not work for 
> roaming 'local' users or static IP addresses (well, static IPs could 
> be used, with a lot of extra work).  Authenication is easier to set 
> up and harder to spoof.)
> 
> > I could spam all the local users as [EMAIL PROTECTED] all 
> > day long without any knowledge of there settings. So I 
> guess, why not 
> > authenticate both ways? Just a pondering, no big  deal since they'd 
> > have to get a scirpt on the server and that'd  make them trackable 
> > pretty quick.
> 
> For remote to local: authenticate how?  You don't want to block mail 
> coming in from random domains (since you don't know which are spam 
> domains and which aren't), so you have to let random people send you 
> email.  Otherwise the only email you can handle is local to local, 
> and that just isn't very useful.  (Note: joemama is probably a 
> registered, legit, and paid-in-full user of remotespamville.com , so 
> you can't say people who aren't from that domain.  He *is* from that 
> domain.)
> 
> And now we are well into anti-spam theology.  (There have been 
> several complete systems proposed to handle the 'authenticated guest' 
> problem here, none currently is in use.)  And out of Perl. ;-)
> 

Cool, good info. 
I was looking at it wrong, after all the subjkect is "My Stupidity!" :)

> Daniel T. Staal
> 
> ---
> This email copyright the author.  Unless otherwise noted, you 
> are expressly allowed to retransmit, quote, or otherwise use 
> the contents for non-commercial purposes.  This copyright 
> will expire 5 years after the author's death, or in 30 years, 
> whichever is longer, unless such a period is in excess of 
> local copyright law.
> ---
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: sending email - Mail::Sender and Mail::Sendmail

2002-01-25 Thread Gary Hawkins

> http://search.cpan.org/doc/JENDA/Mail-Sender-0.7.10/Sender.pm.html
>
> and sending mail took a bit of code like this:

Implied... use Mail::Sender;

> ref ($sender = new Mail::Sender({from => '[EMAIL PROTECTED]', smtp
> => 'company.com'})) or die "$Mail::Sender::Error\n";
>
> (ref ($sender->MailMsg(
> { to  => $Email,
>   cc  => '[EMAIL PROTECTED]',
>   subject => 'Subject Text Here',
>   msg => $Message
> }))
> and print "Mail sent OK."
> )
> or die "$Mail::Sender::Error\n";
>
> # (where $Email was pre-set from a web-form submission and $message was
> a pre-set message in the variable)
>
> ***

Well I'm just wondering if there is much difference between Sender and
Sendmail:

use Mail::Sendmail;

$from = "[EMAIL PROTECTED]";
$to   = $from;

my %mail = (
Smtp=> 'mail.eskimo.com',
From=> $from,
To  => $to,
Subject => 'Test',
Message => 'Testing'
);

if (sendmail %mail) {
print "Mail sent OK.\n";
} else {
print "$Mail::Sendmail::error \n";
}

Hey!  Where's my 'new' doodad?  Just noticed that.  And yet it works.  Maybe
the 'my %mail' accomplishes the same thing?

/g




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: sending email - Mail::Sender and Mail::Sendmail

2002-01-25 Thread Rex Arul

> Well I'm just wondering if there is much difference between Sender and
> Sendmail:
>

I guess, the simplicity of sending mail attachments is laudable with
Mail::Sender, whereas you have to work out a  bit more in Mail::Sendmail to
make attachments work!

The same reason behooves well for sending HTML mails too, which is pretty
straightforward with Mail::Sender.

-- Rex



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




strange trace results using Net::SMTP and Mail::Sender

2002-10-11 Thread Jessee Parker

I don't know if this points to a bug in my operating system, a bug in my
code or if it's normal but basically when I use these modules and run a
strace (using Linux 7.3) it gives me the following:

12:28:39 close(3)   = 0
12:28:39 munmap(0x400c8000, 4096)   = 0
12:28:39 close(3)   = -1 EBADF (Bad file descriptor)

It tries to close something that is already closed if I read it correctly.
I'm pretty new to using the trace feature so maybe I'm off base. Is this
showing a problem or is this normal??

Jessee



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Can't locate object method "Attach" via package "Mail::Sender"

2003-01-31 Thread Dan Muey
I'm getting this error from Mial::Sender and am not sure why. 
Can't locate object method "Attach" via package "Mail::Sender" 
 
What should I check/did I miss/am I doign wrong/etc???
 
Thanks
 
Dan 
+++
 
Below is the perl and the output from the script :
 
__SCRIPT__
 my $contract_html = set_contract_html(); 
 

print "Sending contract...  \n";
 
use Mail::Sender;
eval {
        
    $sender = new Mail::Sender {smtp => "$smtp_serv", from => "$from"};
$sender->OpenMultipart({subject => "$subject", to => "$email_to"});
$sender->Body({ctype => 'text/plain', msg => $text});
$sender->Part({ctype => 'text/html', disposition => 'attachment',
msg => $contract_html
});
$sender->Attach({
description => 'Infiniplex Logo',
ctype => 'image/gif',
encoding => 'base64', 
disposition => 'attachment; filename="infinlogo.gif"; 
type="Gif Image"',
file => 'infinlogo.gif'
});
$sender->Close();
     };
 
if($@) { print "... $@ :: Error sending mail: $Mail::Sender::Error  
\n"; }
else {  print "... Mail sent ok!  \n"; }
 
__SCRIPT OUTPUT__
 
Sending contract... 
... Can't locate object method "Attach" via package "Mail::Sender" at 
/usr/local/www/data/employee/contract.cgi line 114, chunk 5. :: 
Error sending mail:



Adding In-Reply-To Header in Mail::Sender message

2003-03-12 Thread Dan Muey
Any body have any how to add a IN-Reply-To header to a Mail::Sneder email?

Here's what I have where $inreplyto is the value of a In-Reply-To header stored in a 
database.


use Mail::Sender;
(new Mail::Sender)->MailMsg({ 
from => "$admn",
to => "$admn",
smtp => "$smtp",
subject => 'Test Mail Mailer,
In-Reply-To => "$inreplyto",
msg => "HI message"
});

It's not putting it in there that I can tell, what am I missing ??

Thanks

Dan


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problems in Mail::Sender on sending a large attachment file

2012-12-04 Thread Wagner, David --- Sr Programmer Analyst --- CFS

I have used Mail::Sender for a number of years and I have had to
move onto new VM for Processing. 

The Linux is Red Hat Enterprise Linux Server release 5.4
(Tikanga).
Perl is v5.8.8 built for x86_64-linux-thread-multi
Mail::Sender is 8.21

I am only sending attachment file along with a couple of lines
of text, BUT somehow in doing the send, I end up with the following
error:
Unknown encoding '522' at /usr/lib/perl5/site_perl/5.8.8/Mail/Sender.pm
line 96

I have contacted Jenda and he replied back on the initial email
and I did what Jenda suggested and going into the sending of the email,
the default hash has nothing it, but we end up with the above.  The
kicker is that I am running similar code on Solaris, Desktop and another
VM running Perl from 5.8.3 to 5.12.4 using Mail::Sender from 8.13 to
8.21 and those Perl scripts are working correctly in sending the email
with the attachment and no errors. I have another script I am running
using Mail:Sender, but the attachment files are anywhere from 10,000 to
150,000 bytes in size and it works just as expected...

I also use Mail::Sendmail in all the emails that don't have
attachments as per the doc I read, Sendmail does not handle large
attachment files cleanly...

The nice thing about using Perl PMs is that I can switch back
and forth between the different environments and everything works pretty
much the same. Makes writing the script easy also as I only have to have
the PMs loaded and everything works. ( Have been doing this for almost
20 years now and this is really the first time I have had a problem in
working on one system, but not on another ).

The bottom line is has anyone else had problems with sending
large email attachments? If so what did you do to correct or did you try
another approach to handle? I am really looking for a Perl solution so I
don't have to do it one way in a Unix/Linux environment and another in
Windows environment. I am sure Jenda will reply as he replied to my
first emails, but I am running out of time on a project that I need to
close.

Any suggestions or ideas would be greatly appreciated...

 If you have any questions and/or problems, please let me know. 
 Thanks. 
 
Wags ;) 
David R. Wagner 
Senior Programmer Analyst 
FedEx Services 
1.719.484.2097 Tel 
1.719.484.2419 Fax 
1.408.623.5963 Cell
http://Fedex.com/us



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: strange trace results using Net::SMTP and Mail::Sender

2002-10-11 Thread Jenda Krynicky

From: "Jessee Parker" <[EMAIL PROTECTED]>

> I don't know if this points to a bug in my operating system, a bug in
> my code or if it's normal but basically when I use these modules and
> run a strace (using Linux 7.3) it gives me the following:
> 
> 12:28:39 close(3)   = 0
> 12:28:39 munmap(0x400c8000, 4096)   = 0
> 12:28:39 close(3)   = -1 EBADF (Bad file
> descriptor)
> 
> It tries to close something that is already closed if I read it
> correctly. I'm pretty new to using the trace feature so maybe I'm off
> base. Is this showing a problem or is this normal??

It should not cause any problems, but I would not say it's 100% 
normal.

Could you show me your code (for Mail::Sender)?
And could you run your script with 
perl -w
? Maybe it'll print a warning ...

Thanks, Jenda=== [EMAIL PROTECTED] == 
http://Jenda.Krynicky.cz 
==
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Can't locate object method "Attach" via package "Mail::Sender"

2003-01-31 Thread Dan Muey


Also, if I remove the Attach section ( which is supposed to attach a gif for the 
attached html page ), I get a blank email sent to me with a blank attachment called 
ATT12345.html.

It should be an email with a text body and an html page attached with html code in it.

Any thoughts??

Thanks

Dan
> 
> I'm getting this error from Mial::Sender and am not sure why. 
> Can't locate object method "Attach" via package "Mail::Sender" 
>  
> What should I check/did I miss/am I doign wrong/etc???
>  
> Thanks
>  
> Dan 
> +++
>  
> Below is the perl and the output from the script :
>  
> __SCRIPT__
>  my $contract_html = set_contract_html(); 
>  
> 
> print "Sending contract...  \n";
>  
> use Mail::Sender;
> eval {
> 
> $sender = new Mail::Sender {smtp => 
> "$smtp_serv", from => "$from"};
> $sender->OpenMultipart({subject => 
> "$subject", to => "$email_to"});
> $sender->Body({ctype => 'text/plain', msg => $text});
> $sender->Part({ctype => 'text/html', 
> disposition => 'attachment',
> msg => $contract_html
> });
> $sender->Attach({
> description => 'Infiniplex Logo',
> ctype => 'image/gif',
> encoding => 'base64', 
>     disposition => 'attachment; 
> filename="infinlogo.gif"; type="Gif Image"',
> file => 'infinlogo.gif'
> });
> $sender->Close();
>  };
>  
> if($@) { print "... $@ :: Error sending mail: 
> $Mail::Sender::Error  \n"; }
> else {  print "... Mail sent ok!  \n"; }
>  
> __SCRIPT OUTPUT__
>  
> Sending contract... 
> ... Can't locate object method "Attach" via package 
> "Mail::Sender" at /usr/local/www/data/employee/contract.cgi 
> line 114, chunk 5. :: 
> Error sending mail:
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Can't locate object method "Attach" via package "Mail::Sender"

2003-01-31 Thread Dan Muey


Also I've tried doing msg => "text" and msg => "html" ,respectively,
Without using variables that contain the messages, still blank.
Withh the above I would expect the email to just say
text
And when they opened up the html attachment it would just say
Html
 
The ultimate goal is to send a person a note along with an html attachment.

Any ideas as to why the message and the html attachment are blank would be extremely 
appreciated.

Thanks

Dan

> 
> I'm getting this error from Mial::Sender and am not sure why. 
> Can't locate object method "Attach" via package "Mail::Sender" 
>  
> What should I check/did I miss/am I doign wrong/etc???
>  
> Thanks
>  
> Dan 
> +++
>  
> Below is the perl and the output from the script :
>  
> __SCRIPT__
>  my $contract_html = set_contract_html(); 
>  
> 
> print "Sending contract...  \n";
>  
> use Mail::Sender;
> eval {
> 
> $sender = new Mail::Sender {smtp => 
> "$smtp_serv", from => "$from"};
> $sender->OpenMultipart({subject => 
> "$subject", to => "$email_to"});
> $sender->Body({ctype => 'text/plain', msg => $text});
> $sender->Part({ctype => 'text/html', 
> disposition => 'attachment',
> msg => $contract_html
> });
> $sender->Attach({
> description => 'Infiniplex Logo',
> ctype => 'image/gif',
> encoding => 'base64', 
> disposition => 'attachment; 
> filename="infinlogo.gif"; type="Gif Image"',
>         file => 'infinlogo.gif'
> });
> $sender->Close();
>  };
>  
> if($@) { print "... $@ :: Error sending mail: 
> $Mail::Sender::Error  \n"; }
> else {  print "... Mail sent ok!  \n"; }
>  
> __SCRIPT OUTPUT__
>  
> Sending contract... 
> ... Can't locate object method "Attach" via package 
> "Mail::Sender" at /usr/local/www/data/employee/contract.cgi 
> line 114, chunk 5. :: 
> Error sending mail:
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  1   2   >