in reply to Mail Sending Issue

Try Email::Send::SMTP::Gmail

poj

Replies are listed 'Best First'.
Re^2: Mail Sending Issue
by RamyaArulkumar (Initiate) on Mar 02, 2016 at 08:46 UTC

    Already Tried.

    use strict; use warnings; use Email::Send::SMTP::Gmail; my $mail=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', -layer=>'ssl', -port=>465, -verbose => '1' -login=>'mylogin' -pass=>'mypassword'); $mail->send(-to=>'toaddress', -subject=>'Hello!', -verbose=>'1', -body=>'Just testing it', -attachments=>''); $mail->bye;

    But Got the Below Error

    Argument "login" isn't numeric in subtraction (-) at Mail.pl line 6. Argument "pass" isn't numeric in subtraction (-) at Mail.pl line 6. Argument "ramya.a@jouve.in" isn't numeric in subtraction (-) at Mail.p +l line 6. auth(username, password) at C:/Perl/site/lib/Net/SMTPS.pm line 165.

      Try again with added commas

         -verbose => '1',
      #                 ^ here
        -login=>'mylogin',
      #                  ^ here
      
      poj

        I have tried with commas

        use strict; use warnings; use Email::Send::SMTP::Gmail; my $mail=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', -layer=>'ssl', -port=>465,, -verbose => '1', -login=>'mylogin', -pass=>'mypassword'); $mail->send(-to=>'toaddress', -subject=>'Hello!', -verbose=>'1', -body=>'Just testing it', -attachments=>''); $mail->bye;

        But got the below Message

        Can't locate object method "send" via package "5.7.14 <https://account +s.google.c om/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbtfM 5.7.14 a4MT19UHD3fGpNjVTC2ncPlLiH4tdaAg7MSNDZARyumqy0KXDhq9MwPgfgH3TM2 +gnR6Znd 5.7.14 7QKaN4EfHRBclrJB7EKrepBBL4o26oJ6eBQZAEvQz81b-DV382h_El67CjBL6cq +YDSmsy3 5.7.14 v8R5dzea2LOGfUxuPFdeBoXmXV4fVsXvfWD3hBCyw52zNnGhcrQN_igcHPGauOt +PwjYrPd 5.7.14 7yzC66H8uYsnwpU-IuVwAjG1Owao> Please log in via your web browse +r and 5.7.14 then try again. 5.7.14 Learn more at " (perhaps you forgot to load "5.7.14 <https://accounts.google.com/Con +tinueSignI n?sarp=1&scc=1&plt=AKgnsbtfM 5.7.14 a4MT19UHD3fGpNjVTC2ncPlLiH4tdaAg7MSNDZARyumqy0KXDhq9MwPgfgH3TM2 +gnR6Znd 5.7.14 7QKaN4EfHRBclrJB7EKrepBBL4o26oJ6eBQZAEvQz81b-DV382h_El67CjBL6cq +YDSmsy3 5.7.14 v8R5dzea2LOGfUxuPFdeBoXmXV4fVsXvfWD3hBCyw52zNnGhcrQN_igcHPGauOt +PwjYrPd 5.7.14 7yzC66H8uYsnwpU-IuVwAjG1Owao> Please log in via your web browse +r and 5.7.14 then try again. 5.7.14 Learn more at "?) at Mail.pl line 13..google.com/mail/answer/78754 ll7sm51529054pab. +6 - gsmtp