LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to send email from my server to internet mail address. Labview.

I have had great success sending mail when I SMTP to the actual mail server that the email address is on. But when I try to send from my server to some other email address I get an unable to relay "email address" server response. If someone has any ideas on this I would appreciate it. I have included some information that may aid in this endeavor. (I do not want to use Active X thanks to Outlook's dislike of that)

Example:
Test@bellsouth.net email to mail.bellsouth.net works fine. Test@company.com email to mail.company.com works fine. Test@bellsouth.net from mail.company.com gives unable to relay message. (Vice Versa)

Exact server response from SendEmail_LV6.vi from developer zone: (
ht
tp://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3EB9956A4E034080020E74861&p_node=DZ52050&p_submitted=N&p_rank=&p_answer=&p_source=External)

220 server.company.com Microsoft ESMTP MAIL Service, Version: 5.0.2195.5329 ready at Fri, 23 Jan 2004 10:27:22 -0600
250 server.company.com Hello [10.1.1.176]
250 2.1.0 test@company.com....Sender OK
550 5.7.1 Unable to relay for test@bellsouth.net
554 5.5.2 No valid recipients
500 5.3.3 Unrecognized command
0 Kudos
Message 1 of 11
(7,542 Views)
You should use the SMTP server that is used by your regular mail program for outgoing mail, not some random "far" SMTP server.
Are you coming from an IP inside the "company.com" organization? In this case, the company.com server migh be misconfigured an not aware of some local netblocks.

I notice you are coming from a private address (10.1.1.176).
0 Kudos
Message 2 of 11
(7,542 Views)
Thanks for the response!

Yes I connect to my mail server via LAN. I have no problems sending email through outlook (MSExchange or Internet Mail) to this address. Just when I use the SMTP vi. I can send to anyone on my LAN just not on the internet.

I agree that I should use my regular mail server for outgoing mail. I merely mentioned that I can send to the test@bellsouth.net email address if I use mail.bellsouth.net server.
0 Kudos
Message 3 of 11
(7,542 Views)
On Fri, 23 Jan 2004 13:36:04 -0600, DFA Employee wrote:

> Thanks for the response!
>
> Yes I connect to my mail server via LAN. I have no problems sending
> email through outlook (MSExchange or Internet Mail) to this address.
> Just when I use the SMTP vi. I can send to anyone on my LAN just not on
> the internet.
>
> I agree that I should use my regular mail server for outgoing mail. I
> merely mentioned that I can send to the test@bellsouth.net email address
> if I use mail.bellsouth.net server.

Hi,

I wrote that VI. Altenbach is right by saying you should use a local
server. You certainly don't HAVE to but it tends to be a lot faster.
Usually, corporate firewalls will block the port (25) used to access
external SMTP servers but s
ince you can access the bellsouth server from
your workplace, I guess this won't be a problem.

I remember getting the "unable to relay" error when I tried to use a "From
Address" that the server didn't recognize, e.g. server is smtp.aol.com,
use dfaemployee@aol.com for the From Address. Although, I believe
authentication (user and pass) may get you around that... in fact,
bellsouth should always require authentication.

BTW, you can test all of this manually from a telnet session. Just
duplicate the commands I use in the VI. I tend to find that more flexible
when trying to play with a new server.

I'm not sure if I've been much help with this. Remove "killspam" from my
address to contact me directly. Also, go to Openg.com and get the OGIC
SMTP library:

http://openg.org/tiki/tiki-index.php?page=OpenG+Internet+Connectivity+Tools

This newer version supports authentication and attachments.

-Kevin
0 Kudos
Message 4 of 11
(7,542 Views)
SMTP server don't care about the "FROM:" address, it can even be blank or bogus. However they check the actual source IP used to connect to the server.In the early days of the internet, mail relaying was thought of as a useful feature, but due to the SPAM epidemic, virtually all SMTP server will only accept mail messages for (for receiving) or from (for sending) their local users. Running an open relay is highly discouraged and they'll end up getting blacklisted by e.g. MAPS.

Here is a definition of Open Relay.

In your case, you can only use the bellsouth server, if you either (1) send to a bellsouth address, or (2) connect from a
bellsouth subscriber IP address.
0 Kudos
Message 5 of 11
(7,542 Views)
On Sat, 24 Jan 2004 00:16:33 -0500, Kevin Valentine wrote:
>
> I'm not sure if I've been much help with this. Remove "killspam" from my
> address to contact me directly.

If you're reading this from the NI forum, you can't see my fake reply to
address. Sorry about that, I tend use a news reader when posting to the
comp.lang.labview forum.

kevinvalentine AT netzero DOT net
0 Kudos
Message 6 of 11
(7,115 Views)
On Sat, 24 Jan 2004 13:08:14 -0600, altenbach wrote:

> SMTP server don't care about the "FROM:" address, it can even be blank
> or bogus. However they check the actual source IP used to connect to the
> server.In the early days of the internet, mail relaying was thought of
> as a useful feature, but due to the SPAM epidemic, virtually all SMTP
> server will only accept mail messages for (for receiving) or
> from (for sending) their local users.

[snip]

Not all servers allow false or blank email addresses for "MAIL FROM:"
argument. Here's what happens when I try to use a bogus address even after
authentication:

SERVER: 235 Authentication successful
CLIENT: MAIL FROM:
SERVER: 450 Unable
to find nowhere.com

From my limited experience, very few servers will actually check the
domain but some do. For this particular server, a blank email address will
not work either. It depends on how the SMTP server is configured. The best
way to check is through a telnet session.
Message 7 of 11
(7,542 Views)
I agree, it is ususual for an SMTP server to check the validity of the reverse-path address, because mailers could just use a invalid address on a valid domain, e.g. bogusaddress@hotmail.com. The address in the "MAIL FROM:" command gives the reverse path to communicate errors and can be different from the actual sender address.

In any case, this is quite irrelevant for the current discussion, because address verification has nothing to do with relaying.

The error message:
550 5.7.1 Unable to relay for test@bellsouth.net
is completely unrelated to your:
450 Unable to find nowhere.com

Just to clarify, I was talking about address in the FROM: field of the message header, and not what is
communicated in the "MAIL FROM:" SMTP command. (Similarly, the TO: field in the header is not used for message targeting and can be anything, it can even be missing and the SMTP server still does not care. Targeting is done entirely with the RCPT TO: SMTP command which not contained in the header (the mail header is part of the message DATA). Refer to RFC 821 for further details.

You probably won't find a legitimate SMTP server that allows relaying, so the solution is to use the designated SMTP server for the particular location.
0 Kudos
Message 8 of 11
(7,542 Views)
Just curious. How does Outlook send a message to test@bellsouth.net from my mail.company.com? I am using SMTP for outgoing messages also...
0 Kudos
Message 9 of 11
(7,542 Views)
What SMTP server is defined in outlook for outgoing mail? That is the answer!

(Whatever this is, you should use it for the "mail server" terminal of the SMTP VIs. Does your SMTP server require authentication (few do)? in this case you might have to look into the OpenG version as Kevin mentioned. I have not tested the OpenG version)
0 Kudos
Message 10 of 11
(7,542 Views)