I would like to send zip file via email

My script:

Code:
#!/usr/bin/perl

use Net::SMTP::SSL;
use Time::localtime;

print $ARGV[0] . "\n";
my $zipfile = '';
$zipfile = $ARGV[0];


$host = "host";
$username = "usernme";
$password = "password";
$filename = "$zipfile";
$name = "dailyreport.zip";
$email = 'abcd@gmail.com';
my $tm = localtime;
my $TimeDate = sprintf ("%02d:%02d %04d-%02d-%02d", $tm->hour, $tm->min, $tm->year+1900, ($tm->mon)+1, $tm->mday);



# Create a new SMTP object
$smtp = Net::SMTP::SSL->new($host, Port=>465, Debug   => 1, SSL => 0) or die "Can't connect";
$smtp->auth($username, $password)                 or die "Can't authenticate:".$smtp->message();
#$smtp = Net::SMTP::SSL->new($host, port=>465);
#$smtp->auth ( $username, $password ) or die "Could not authenticate $!";
$smtp->mail('email@host.com');
$smtp->to('abc@gmail.com');
$smtp->data();

$smtp->datasend("From: abc\@gmail.com\n");
$smtp->datasend("To: $email\n");
$smtp->datasend("Subject: Daily_Report ['.$TimeDate.'] \n");
$smtp->datasend("MIME-Version: 1.0\n");
$smtp->datasend("Content-Disposition: attachment; file= \"$filename\"\n");
$smtp->datasend("Content-Type: application/zip; name= \"$filename\"\n");
$smtp->datasend();
$smtp->dataend();
$smtp->send();
$smtp->quit();
The error code 502 (5.5.2 Error: command not recognized)

Code:
$ perl dailyrepot.pl dailyreport.zip
dailyreport.zip
Net::SMTP::SSL>>> Net::SMTP::SSL(1.03)
Net::SMTP::SSL>>>   IO::Socket::SSL(2.019)
Net::SMTP::SSL>>>     IO::Socket::INET(1.33)
Net::SMTP::SSL>>>       IO::Socket(1.34)
Net::SMTP::SSL>>>         IO::Handle(1.33)
Net::SMTP::SSL>>>           Exporter(5.68)
Net::SMTP::SSL>>>   Net::Cmd(3.07)
Net::SMTP::SSL>>>   IO::Socket::IP(0.21)
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 220 mta1.host.com ESMTP Postfix
Net::SMTP::SSL=GLOB(0x1f754b0)>>> EHLO localhost.localdomain
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250-mta1.host.com
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250-PIPELINING
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250-SIZE 20480000
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250-VRFY
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250-ETRN
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250-AUTH PLAIN LOGIN
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250-AUTH=PLAIN LOGIN
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250-8BITMIME
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250 DSN
Net::SMTP::SSL=GLOB(0x1f754b0)>>> AUTH PLAIN eHRpbWUAeHRpbWUAVGlheGExMjNhQA==
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 235 2.7.0 Authentication successful
Net::SMTP::SSL=GLOB(0x1f754b0)>>> MAIL FROM:<email@host.com>
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250 2.1.0 Ok
Net::SMTP::SSL=GLOB(0x1f754b0)>>> RCPT TO:<abc@gmail.com>
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250 2.1.5 Ok
Net::SMTP::SSL=GLOB(0x1f754b0)>>> DATA
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 354 End data with <CR><LF>.<CR><LF>
Net::SMTP::SSL=GLOB(0x1f754b0)>>> From: abc@gmail.com
Net::SMTP::SSL=GLOB(0x1f754b0)>>> To: abc@gmail.com
Net::SMTP::SSL=GLOB(0x1f754b0)>>> Subject: Daily_Report ['.09:18 2016-05-05.'] 
Net::SMTP::SSL=GLOB(0x1f754b0)>>> MIME-Version: 1.0
Net::SMTP::SSL=GLOB(0x1f754b0)>>> Content-Disposition: attachment; file= "dailyreport.zip"
Net::SMTP::SSL=GLOB(0x1f754b0)>>> Content-Type: application/zip; name= "dailyreport.zip"
Net::SMTP::SSL=GLOB(0x1f754b0)>>> .
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 250 2.0.0 Ok: queued as 0B1E1606045
Net::SMTP::SSL=GLOB(0x1f754b0)>>> SEND FROM:<>
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 502 5.5.2 Error: command not recognized
Net::SMTP::SSL=GLOB(0x1f754b0)>>> QUIT
Net::SMTP::SSL=GLOB(0x1f754b0)<<< 221 2.0.0 Bye
Please help me to fix that error.

Thanks