flieckster has asked for the wisdom of the Perl Monks concerning the following question:
all works well, but when i get the email it looks like this.#!/usr/bin/env perl use strict; use warnings; use File::Find; use File::Copy; use Email::Send; use Mail::Sender; use Email::Send::SMTP::Gmail; use POSIX qw(strftime); my $date = strftime("%m-%d-%y",localtime); my $time = strftime("%I:%M:%S",localtime); my $directory ="/Users/flieckb/Desktop/files/"; my $to ='brianflieck\@gmail.com'; my $from='bflieck\@industrialcolor.com'; my $subject = "test"; chdir( $directory ) or warn "Cant chdir to $directory $!"; my(@push_list) = glob "*"; my $filecount = @push_list; my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp-relay.gm +ail.com', -login=>'youremailadd +resss, -pass=>'yourpassword' +, # -layer=> 'ssl', -port=> '25', -debug=> 1,); $mail->send(-to=>"$to", -from=>"$from", -subject=>"$subject", -body=>" +@push_list\n total files pushed: $filecount"); $mail->bye;
1a.txt 1b.txt 1c.txt 1d.txt 1e.txt 1f.txt 1g.txt 1h.txt 1i.txt 1j.txt 1k.txt 1l.txt 1m.txt 1n.txt 1o.txt total files pushed: 15
what isn't the \n working in this case?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: adding carriage return to gmail script
by talexb (Chancellor) on Jun 13, 2016 at 15:01 UTC | |
by BillKSmith (Monsignor) on Jun 14, 2016 at 03:20 UTC | |
by talexb (Chancellor) on Jun 14, 2016 at 18:19 UTC | |
by BillKSmith (Monsignor) on Jun 14, 2016 at 19:10 UTC | |
|
Re: adding carriage return to gmail script
by pryrt (Abbot) on Jun 13, 2016 at 15:07 UTC | |
by flieckster (Scribe) on Jun 13, 2016 at 16:20 UTC | |
by NetWallah (Canon) on Jun 13, 2016 at 17:04 UTC | |
by pryrt (Abbot) on Jun 13, 2016 at 17:52 UTC | |
by flieckster (Scribe) on Jun 15, 2016 at 21:09 UTC | |
|
Re: adding carriage return to gmail script
by Marshall (Canon) on Jun 13, 2016 at 14:59 UTC |