Reputation: 31
i am trying to send a email with multiple .csv files from Solaris10 to someone
i have two questions now
(uuencode test/test.csv test/test.csv; uuencode test/test1.csv test/test1.csv) | mailx -s test "[email protected] cc:[email protected]"
with this command, Although i could send a email with .csv files
when i receive that email from Gmail, there was no problem
but on other Emails (outlook...) there were no files attached and were changed to some weird texts and involved into email context.
Could you please explain what is happening here and the solution?
thank you guys
Upvotes: 0
Views: 270
Reputation: 69314
Saying "if i can avoid to use Perl modules then it would be better" isn't the same as saying "I can't use any Perl modules", so here is the currently recommended way to do this. It uses the Email::Stuffer module.
use Email::Stuffer;
Email::Stuffer->from('someone@somedomain')
->to('someone.else@someotherdomain')
->text_body("Here's the data")
->attach_file('test/test.csv')
->attach_file('test/test1.csv')
->send;
The documentation also includes an example of doing the same thing using the older, Email::MIME to demonstrate how much simple it is with the newer module.
If you're not using CPAN, then you're not using most of the power of Perl. Setting up the ability to easily install and use CPAN modules will make your life far more enjoyable.
Upvotes: 1