[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-win32-admin
Subject: Re: Problem using the Mail:Sender Module
From: "Jenda Krynicky" <Jenda () McCann ! cz>
Date: 1999-12-21 17:08:08
[Download RAW message or body]
> I have an XML document that is being parsed. When the parsing fails due to
> an invalid XML document, I am capturing the error message from the parser
> and sending it as an attached file in an email to the person responsible
> for
> the file. I have the email working, however, I cannot get the file to
> attach. Below is the code for the emailer part which runs a batch file
> that
> runs the parser. I see the file being created and see the error messages
> being written to the file, and receive the email that is sent off due to
> the
> error, however, I am not getting the file attached to the email. I am not
> sure where I am going wrong in the code. Any help would be greatly
> appreciated.
>
> Thanks,
>
> Joanna
>
> *************** CODE ********************
>
> $args = "D:/Cup/Xml/Perl/ProductImport.bat";
> if (system($args) != 0)
> {
>
> #### SEND EMAIL ####
> BEGIN { $| = 1; print "1..1\n"; }
> END {print "not ok 1\n" unless $loaded;}
> use Mail::Sender;
> $loaded = 1;
> print "ok 1\n";
> ref ($sender = new Mail::Sender({from =>
> 'jgilberti@ftpoint.com',smtp
> => 'mail.ftpoint.com'})) or die "$Mail::Sender::Error\n";
> (ref ($sender->MailMsg({to =>'jgilberti@ftpoint.com', subject =>
I thought you wanted to MailFile, or not ? ;-)
MailMsg ignores the file=> parameter, you have to use MailFile if
you want to attach something.
Jenda
== Jenda@Krynicky.cz == http://Jenda.Krynicky.cz ==
The phenomenon of UFO doesn't say anything about
the presence of intelligence in space.
It just shows how rare it is here on the earth.
A.C.Clarke
---
You are currently subscribed to perl-win32-admin as: [perl-win32-admin@progressive-comp.com]
To unsubscribe, forward this message to
leave-perl-win32-admin-90393O@lyris.activestate.com
For non-automated Mailing List support, send email to
ListHelp@ActiveState.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic