Hi Karl,

Below is the code I tried for single user that's fine but attachment and multiple user when I tried it throws error.Please suggest me what should I try now. Thanks in advance
#!/usr/bin/perl use strict; use warnings; use LWP::Simple; use Email::Send; use Email::Send::Gmail; use Email::MIME::Creator; use IO::All; my $url = "https://www.google.co.in/?gws_rd=cr&ei=VJzjUrT3LMaPrgeQ +5oHQDg/csv"; my $file = "C:\Users\Administrator\Desktop\a.csv"; my $status = mirror($url,$file); die "Cannot retrieve $url" unless is_success($status); my $url1 = "https://www.google.co.in/?gws_rd=cr&ei=VJzjUrT3LMaPrge +Q5oHQDg/csv"; my $file1 = "C:\Users\Administrator\Desktop\a.csv"; my $status1 = mirror($url1,$file1); die "Cannot retrieve $url" unless is_success($status1); my $email = Email::MIME->create( header => [ From => 'abc@gmail.com', To => 'abc@gmail.com', Subject => 'Test Mail', Message => ' Hi , How are you? Test mail please ignore. Thanks, ', CC => 'abc@gmail.com' ], ); attributes => [ { filename =>"a.csv", content_type =>"application/csv", disposition =>"attachment", Name =>"C:\Users\Administrator\Desktop\a.csv", }, body => io( "C:\Users\Administrator\Desktop\a.csv" )->all, { filename =>"a.csv", content_type =>"application/csv", disposition =>"attachment", Name =>"C:\Users\Administrator\Desktop\a.csv", }, body => io( "C:\Users\Administrator\Desktop\a.csv" )->all, ], ); my $sender = Email::Send->new( { mailer => 'Gmail', mailer_args => [ username => 'abcgmail.com', password => 'abcd0000', ] } ); eval { $sender->send($email) }; die "Error sending email: $@" if $@;

In reply to Re^2: PERL MIME:LITE by Bhaskar Patel
in thread PERL MIME:LITE by Bhaskar Patel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.