Thank you for your continued attention. I can type again and give better reports of what is or is not happening. I think my values of lexical variables going into it are correct. Again, I use ellipses for values I'd rather not splash all over the net. Output:

page is 7ae191.html host is smtp.1and1.com phone is ...@txt.att.net username is ... password is ... ******************************************************************* Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER together with SSL_ca_file|SSL_ca_path for verification. If you really don't want to verify the certificate and keep the connection open to Man-In-The-Middle attacks please set SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application. ******************************************************************* at C:/Perl/site/lib/Net/SMTP/TLS.pm line 181. invalid SSL_version specified at C:/Perl/lib/IO/Socket/SSL.pm line 389 +.

Current script

#!/usr/bin/perl -w use strict; use 5.010; use lib "template_stuff"; use html3; sub rndStr{ join'', @_[ map{ rand @_ } 1 .. shift ] } my $new_name = rndStr( 5, 'a'..'z', 1..9); my $ref_to_name = \$new_name; my $return_page = create_page($ref_to_name); say "page is $return_page"; email_link($return_page); sub email_link{ use strict; use 5.014; use Net::SMTP; use config2; my $link = shift; my $sub_hash = "my_ftp"; my $host = $config{$sub_hash}->{'smtp'}; say "host is $host"; my $phone = $config{$sub_hash}->{'phone'}; say "phone is $phone"; my $username = $config{$sub_hash}->{'username'}; say "username is $username"; my $password = $config{$sub_hash}->{'password'}; say "password is $password"; if (1) { use Net::SMTP::TLS; my $mailer = new Net::SMTP::TLS( $host, #Hello => 'some.host.name', Port => 587, #redundant User => $username, Password=> $password) or die "Unable to connect to '$host'. $@"; $mailer->mail("myself"); $mailer->to($phone); $mailer->data; $mailer->datasend($link); $mailer->dataend; $mailer->quit; } else { say '$ENV{USER} does not exists or is not defined.'; } } __END__

So again, I'm wondering how I seem to be making hard what everyone else thinks is super easy....


In reply to Re^4: instantiating an smtp object by Aldebaran
in thread instantiating an smtp object by Aldebaran

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.