Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 vb.net mailmessage

Author  Topic 

jhermiz

3564 Posts

Posted - 2007-07-20 : 08:27:33
One of the interns working at our company created this engineering change request tool. Problem is all the routing process uses SMTP mail and our admins dont want to open up port25 on the local machine.

When someone does something like this:


....
Dim smtpmail As New SmtpClient
smtpmail.Host = "99.xxx.xxx.xxx"

If MsgBox("Send Email?", MsgBoxStyle.YesNo, "Advance ECN") = MsgBoxResult.Yes Then

smtpmail.Send(email)


This is just relaying the message from the local host to the server right? Hence one must open smtp port locally? I'm pretty sure thats how it works but wanted to make sure.

I guess the guy is looking for alternatives. The only thing I could think of is using the outlook object model or writing some activex code.

Anyones input ?

Thanks

Programmers HowTo's -- [url]http://jhermiz.googlepages.com[/url]

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-07-20 : 08:32:14
>>This is just relaying the message from the local host to the server right?

Only if you set the host to be the local machine. You can set the host to be the remote machine and no ports need to be open and no mail server needs to be running on the local machine at all.

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

jhermiz

3564 Posts

Posted - 2007-07-20 : 11:41:55
quote:
Originally posted by jsmith8858

>>This is just relaying the message from the local host to the server right?

Only if you set the host to be the local machine. You can set the host to be the remote machine and no ports need to be open and no mail server needs to be running on the local machine at all.

- Jeff
http://weblogs.sqlteam.com/JeffS




Hmm now Im even more confused :)....I guess than what he has should work. Right now it doesnt and our admin had to open port 25 on the local machine and it started working fine. The code does not use the local machine / local ip. It has the correct ip address of the remote machine (i just used xx's above). I always thought that even in this case the local machine still needs to use SMTP to relay that message to the server ?

So you're saying what he has should work without opening port 25 on the localmachine ?

Programmers HowTo's -- [url]http://jhermiz.googlepages.com[/url]
Go to Top of Page

jhermiz

3564 Posts

Posted - 2007-07-20 : 11:44:50
This is vb.net win form app by the way.

Programmers HowTo's -- [url]http://jhermiz.googlepages.com[/url]
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-07-20 : 11:55:17
>>So you're saying what he has should work without opening port 25 on the localmachine ?

As far as I know ... this site is pretty helpful if you haven't seen it already:

http://www.systemnetmail.com/

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page
   

- Advertisement -