Hi, I am new to perl, and dont know much about CPAN and modules... What am I doing wrong in the Net::SMTP::SSL constructor?!
This works fine: my $smtp_port=465; my $smtp = Net::SMTP::SSL->new(Host => "smtp.gmail.com", Port => $smtp_port); die "Couldn't connect to server" unless $smtp; But, this does NOT work: my $smtp_port=465; my $smtp_server="smtp.google.com"; my $smtp = Net::SMTP::SSL->new(Host => $smtp_server, Port => $smtp_port); die "Couldn't connect to server" unless $smtp; Error: Couldn't connect to server at ./process_sweep.pl line 1298. The documentation says: Host - SMTP host to connect to. It may be a single scalar, as defined for the PeerAddr option in IO::Socket::INET, or a reference to an array with hosts to try in turn. The "host" method will return the value which was used to connect to the host. I have tried using: my $smtp_port=465; my @smtp_server; push(@smtp_server,"smtp.google.com"); my $smtp = Net::SMTP::SSL->new(Host => [EMAIL PROTECTED], Port => $smtp_port); die "Couldn't connect to server" unless $smtp; But this doesn't work either...