flieckster has asked for the wisdom of the Perl Monks concerning the following question:
so the above code works on my one system just fine, i and loaded all the modules that are required for this simple script, yet when i run it i get the following error.#!/usr/bin/env perl use strict; use warnings; use File::Find; use File::Copy; use Mail::Sender; use Net::SMTP; use Email::Send::SMTP::Gmail; my $user = '####@####.#'; my $pass = '########'; my ($mail,$error)=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.co +m', -login=>$user, -pass=>$pass, -port=> '25', -verbose=>1, -debug=> 1,); my $subject = "Folder Counts"; my $to = '####@####.com'; $mail->send(-to=>"$to",-from=>"$to", -subject=>"$subject"); $mail->bye;
Where is it getting "my Favorite:" from? thanks all.Connecting to smtp.gmail.com using tls with LOGIN on port 25 and timeo +ut of 60 Net::SMTPS>>> Net::SMTPS(0.06) Net::SMTPS>>> IO::Socket::IP(0.37) Net::SMTPS>>> IO::Socket(1.38) Net::SMTPS>>> IO::Handle(1.36) Net::SMTPS>>> Exporter(5.72) Net::SMTPS>>> Net::SMTP(3.10) Net::SMTPS>>> Net::Cmd(3.10) Net::SMTPS=GLOB(0x7ff7c22e6fe0)<<< 220 smtp.gmail.com ESMTP s28sm13216 +4qts.35 - gsmtp Net::SMTPS=GLOB(0x7ff7c22e6fe0)>>> EHLO localhost.localdomain Net::SMTPS=GLOB(0x7ff7c22e6fe0)<<< 250-smtp.gmail.com at your service, + [4.14.7.58] Net::SMTPS=GLOB(0x7ff7c22e6fe0)<<< 250-SIZE 35882577 Net::SMTPS=GLOB(0x7ff7c22e6fe0)<<< 250-8BITMIME Net::SMTPS=GLOB(0x7ff7c22e6fe0)<<< 250-STARTTLS Net::SMTPS=GLOB(0x7ff7c22e6fe0)<<< 250-ENHANCEDSTATUSCODES Net::SMTPS=GLOB(0x7ff7c22e6fe0)<<< 250-PIPELINING Net::SMTPS=GLOB(0x7ff7c22e6fe0)<<< 250-CHUNKING Net::SMTPS=GLOB(0x7ff7c22e6fe0)<<< 250 SMTPUTF8 Net::SMTPS=GLOB(0x7ff7c22e6fe0)>>> my favorite: LOGIN Authentication (SMTP) failed Can't locate object method "send" via package "-1" (perhaps you forgot + to load "-1"?)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Email::Send::SMTP::Gmail issue
by zentara (Cardinal) on May 04, 2017 at 14:35 UTC | |
Re: Email::Send::SMTP::Gmail issue
by stevieb (Canon) on May 03, 2017 at 21:27 UTC |