I tried it with the following code (look behind the output), but I keep getting following output:
C:\Documents and Settings\Isabelle\Bureaublad\bernard>perl mailstuurde +r.pl Net::SMTP_auth>>> Net::SMTP_auth(0.07) Net::SMTP_auth>>> Net::SMTP(2.29) Net::SMTP_auth>>> Net::Cmd(2.26) Net::SMTP_auth>>> Exporter(5.58) Net::SMTP_auth>>> IO::Socket::INET(1.27) Net::SMTP_auth>>> IO::Socket(1.28) Net::SMTP_auth>>> IO::Handle(1.24) Net::SMTP_auth: Unexpected EOF on command channel at mailstuurder.pl l +ine 8 Can't call method "auth" on an undefined value at mailstuurder.pl line + 9.
And here is the code I use:
#!/usr/bin/perl use warnings; use strict; use Net::SMTP_auth; use Net::SMTP; my $smtp = Net::SMTP_auth->new('smtp.gmail.com', Debug => 1); $smtp->auth('LOGIN', 'b.siebens@gmail.com', '********'); $smtp->mail('watcher@landbouwkring.be'); $smtp->to('b.siebens@gmail.com'); $smtp->data(); $smtp->datasend("To: b.siebens\@gmail.com"); $smtp->datasend("From: watcher\@landbouwkring.be"); $smtp->datasend("\n"); $smtp->datasend("A simple test message.\n"); $smtp->dataend(); $smtp->quit();
Anybody knows how I can fix this error? I've tried all from Mail::Mailer to Mail::Sendmail (and some other things), but this seems to be best suited to solve my problems, so getting this to work would be quite nice.

In reply to Re: Net::SMTP_auth by watcher@LBK
in thread Net::SMTP_auth by projekt21

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.