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

hello, i am unable to send mail to an outside domain through a script i wrote that uses our company's smtp mail server. im guessing this isnt quite a perl problem, since the code i know works for sending mail INSIDE the domain. but does anyone know how to correct this, or what i should be looking into in order to correct this, or where there is a newsgroup or site that could help me out? the error im getting is typical: 550 not local host blah.edu, not a gateway

2005-03-05 Edited by Arunbear: Changed title from 'smtp problem', as per Monastery guidelines

Replies are listed 'Best First'.
Re: (OT) smtp problem
by cfreak (Chaplain) on Mar 02, 2005 at 18:50 UTC

    Well I don't know anything about your company's mail server but to venture a guess: Perhaps your company's mail server requires SMTP authentication before relaying mail for another server?

Re: (OT) smtp problem
by ww (Archbishop) on Mar 02, 2005 at 18:58 UTC
    1. ++ for insight. It's not a perl question
    2. Code and expectations/results/relevant logfiles may be useful
    3. Are you familiar with google etc?
    4. What mailserver/environment?

    Once you have info for 4, you may use 3 to get a clue about where to send 2. ...and your question

    And you may want to be ready to explain why you want to send mail using "(y)our company's smtp mail server" without also using your company's selected email client?
Re: (OT) smtp problem
by baztastic (Scribe) on Mar 02, 2005 at 20:23 UTC

    What, if any, module are you using?

    Depending on the module there are various ways of authenticating yourself with the mail server. That should allow you to send mail to people outside the domain.

    Generally I hate to see replies that only say read the doc but I think that that may solve the problem for you. If it doesn't post back with a little more info and I am sure that you will get the answer that you need.

    -baztastic
Re: (OT) smtp problem
by betterworld (Curate) on Mar 02, 2005 at 18:53 UTC
    Once I had a similar problem and it turned out that the reason was that the Envelope-Sender did not have a domain part, so foreign mail servers did not accept the mails because they did not know the user names.
    Hope this helps..
Re: (OT) smtp problem
by phaylon (Curate) on Mar 02, 2005 at 20:10 UTC
    Maybe you find something useful in your mailserver logfile. Is there a reason you are not using the local sendmail interface?

    Ordinary morality is for ordinary people. -- Aleister Crowley
Re: (OT) smtp problem
by jonadab (Parson) on Mar 02, 2005 at 22:36 UTC

    use Mail::Sendmail

    Seriously, this module is simple, with a simple interface, so it's easy to use, implemented in pure Perl (so it's easy to install even when you don't have a compiler or a working CPAN.pm), and basically Just Works. Get it. Use it.