vi_srikanth has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: MIME::Lite - Relay access denied
by Corion (Patriarch) on Jul 26, 2006 at 12:32 UTC

    This is a configuration problem with how your mail is set up.

    It sounds like your mail server, smtp.myserver.com is only configured to accept mail for @myserver.com addresses and will not forward your mail to @xyz.com addresses. You will need to either talk to the xyz.com mailserver directly or reconfigure your own mailserver.

    Note that relaying mailservers still are a major source of spam, so you need to be very careful with your setup when changing it to allow specific relaying.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: MIME::Lite - Relay access denied
by rhesa (Vicar) on Jul 26, 2006 at 14:02 UTC
    I suggest you add Debug => 1 to your send() call, so you can see the exact smtp conversation. That should tell you if the authentication even takes place, and how the server reacts to it.

    $msg->send( 'smtp', 'smtp.myserver.com', AuthUser=>'srikanth@myserver.com', AuthPass=>'mypass', Timeout=>60, Debug => 1 );
Re: MIME::Lite - Relay access denied
by bart (Canon) on Jul 26, 2006 at 14:47 UTC
    Your problem is not in MIME::Lite, but in the setup of your SMTP server. "relay denied" means the SMTP server won't accept mail from a particular domain, to a particular domain, or when not from one of a few particular machines. It won't work with whatever program you try to send mail on that machine. Talk to the admin of the SMTP server.
Re: MIME::Lite - Relay access denied
by izut (Chaplain) on Jul 26, 2006 at 13:26 UTC

    Are you sure that your user/password works as expected? Do you use the same user/password with your mail client of choice?

    Igor 'izut' Sutton
    your code, your rules.

Re: MIME::Lite - Relay access denied
by xorl (Deacon) on Jul 26, 2006 at 15:55 UTC

    I agree you should talk to your mail admin.

    However you could try to send it from sendmail instead of your smtp server. Basically just do $msg->send() with no params or "sendmail" followed by the path to sendmail.

    Also if you continue with smtp, I'd check out the documentation regarding AuthUser and AuthPass. I don't see them documented anywhere in the documentation. It does say that it uses Net::SMTP so you might need to replace both AuthUser and AuthPass with "auth=>(username,password)" or however it works.

    Update: As pointed out below AuthUser and AuthPass are included in the developer releases. You might want to upgrade to the official stable release instead of using something that is still under development (unless of course you like to be a beta tester).

      I thought the same thing when I checked CPAN, but noticed the Latest Release link at the top of the page.

      Support for AuthUser and AuthPass starts in 3.01_03 (current is 3.01_05).

      I have got such problem when I changed the server with mail sending application. The same code, the same mail server, but on new PC it didn't work. My solution was to use $msg->send;