I'll leave Jenda to answer whether it's a good use of his module. I'd say if this works for your situation then it works (if there aren't any problems with the users whose mail you are forwarding and their mail clients). I'd still advocate the resending of the original message. I would suggest if you send the messages as attachments that you don't forge the From address to be the original sender. It seems like good netiquette to not impersonate, and if you leave it as an address you have access to you'd be notified of bounces or other potential issues (in addition to avoiding any potential security problems with the SMTP server). You can add a Reply-To header with the original address to make life easier on the mail recipient, and then also include the original sender's address either in the subject or somewhere else convenient (possibly in the From header as the descriptive name and not the address). I'm guessing the SMTP server isn't actually "localhost"?
Panda-X wrote: > Hello again Jenda and Matthew, > > 2007/10/11, Jenda Krynicky <[EMAIL PROTECTED]>: > >> From: Panda-X <[EMAIL PROTECTED]> >> >>> Hi Jenda... >>> >>> Are you the author of Mail::Sender ?? I like it very much, that's very >>> handy, as well as Config::IniHash. >>> >> Yeah, that's me. Thanks :-) >> >> >>> Thanks for give me a reply, and I hope my problem can be fixed in the >>> Mail::Sender way. >>> >> I doubt it. The emails most likely already have all the headers and >> boundaries and the attachments are encoded etc etc etc. So you do not >> need Mail::Sender ... you actually can't use it as it insists on >> generating the headers and boundaries itself. >> >> Net::SMTP looks like a more likely candidate. >> >> >> > > I finally figure it out, but I just don't know if I am doing it in proper > way. > I mean I get done for what I want now, but I don't know if I am using it > safely > or if some situation I'll unable to attach the .eml file in proper... Please > advise. > > Here's my code : > > my $M = new Mail::Sender ({ > smtp => 'localhost', > }) ; > > $M -> OpenMultipart ( { > to => $userMailAccount, > from => $oriSender, > subject => "\(Rollback) - $oriSubject" > }) ; > > $M -> Part ( { > ctype => "text/html" , > disposition => 'inline' , > encoding => '7bit', > msg => "Please open attachment to read the original > content" }) ; > $M -> EndPart(); > > $M -> Attach ( { > disposition => "inline", > encoding => "7bit",file => $rawfile # $rawfile is > the .eml file I firstly get() from server > }); > > $M -> Close; > > > Thank in advise =) > Panda-X > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/