Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4062950
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:39:49+00:00 2026-05-20T15:39:49+00:00

I’m trying to send an email with Perl through SSL. The best package I’ve

  • 0

I’m trying to send an email with Perl through SSL. The best package I’ve come across, based on examples, is Net::SMTP::SSL. This appears to be the standard. Unfortunately, the constructor always returns undef for me:

my $smtp = Net::SMTP::SSL->new('smtp.server.com', Port => 25, Debug => 1);

I have verified, re-verified, and re-re-verified the server name and port number using a .NET application that does essentially the same thing. Everything works fine with the .NET app, so I don’t see any reason why I should have problems connecting to the smtp server.

It would be extremely helpful if the module would provide some sort of debugging information, but $! is coming up blank. Is there any explanation for why the $smtp variable would be come up undefined? Or is there any way I can find some useful debugging information from the constructor call?

Edit: Yes, I know that port 25 is a weird port to use with SSL. I don’t know why this port was chosen, but this is the port that’s being used. Unfortunately I’m constrained by time and it’s going to be easier for me to figure this out with another technology than try to debug the cpan module. Thanks everyone for helping.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:39:50+00:00Added an answer on May 20, 2026 at 3:39 pm

    Net::SMTP::SSL uses Net::SMTP to do its work. In looking at the source for Net::SMTP in its new sub, undef is returned for a number of error conditions. To start, you can either step through this function call in a debugger, or manually sprinkle print statements throughout its code to see how far it is getting before bailing.

    Also, check that you have IO::Socket::SSL installed – this is used for the network operations. If you installed your modules using the cpan client you should have it, but other package managers like rpm sometimes screw up the dependency chain.

    I would also double- and triple-check that you have the right port: Net::SMTP::SSL’s documentation says:

    Due to the nature of Net::SMTP’s new method, it is not overridden to make use of a default port for the SMTPS service. Perhaps future versions will be smart like that. Port 465 is usually what you want, and it’s not a pain to specify that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to loop through a bunch of documents I have to put
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.