in reply to email through Exchange server using StrawberryPerl

sgmansell:

You created an empty hash reference, and then tried to call its MailMsg method. It doesn't have such a method. You need an object with that method. As shown in the synopsis in the documentation, you should be able to do it like:

$sender = new Mail::Sender();

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: email through Exchange server using StrawberryPerl
by sgmansell (Initiate) on Sep 30, 2014 at 19:07 UTC

    Thank you roboticus, that solved the "method" problem. Now I get

    'connect() failed:

    Does this mean the code couldn't get through port 25? Do I now need to talk to my company's mail server IT people to find out the parameters to get out?

      'connect() failed:

      The more important part of the error message is probably after the colon...

      Exchange can speak SMTP on port 25. Might be requiring authentication (user name and password). Depends on how it is configured.

      Might as well be a typo in the host name or something completely different...

      Read the complete error message - at least the part of it that consists of words :-)

      Even if you overcome this connect error, the next hurdle might be "relaying denied", and after you solved that, maybe comes "unknown recipient". So, at least in the "relaying denied" case, you will have to ask your IT people.

        I'm sorry, How do I read anything after the :? The error message is -3 which is "connect() failed:" Is there another command to see the rest of the message?

        Thanks,

        Steve

      sgmansell:

      Yes, that's what it means. As soonix states, the message after the colon should give you (or your EMail administrator) some further information on it. Because of the spam problem, many places lock out port 25, require authentication and/or alternate protocols. You'll definitely want to talk with your mail server IT team to help figure out what you need to do.

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.