Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SMTP Server

Status
Not open for further replies.

shag

Technical User
Jul 2, 2001
4
US
Anybody got code on an smtp server in vb ??
 
Are you trying to use CDONT? To make this work the SMTP service must be setup correctly on the server you are going to try and use.


Dim objNewMail, sString1
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.From = "me@here.net"
objNewMail.To = "you@there.net"
objNewMail.Subject = "Your sample SMTP"
'*** sString1 is the message
sString1 = sString1 + "REMOTE_ADDR: " + Request.ServerVariables("REMOTE_ADDR") + vbCrLf

For Each strKey In Request.ServerVariables
sString1 = sString1 + Chr(10) + strKey + ": " +
Request.ServerVariables(strKey)
Next

objNewMail.Body = sString1
objNewMail.Send
Set objNewMail = Nothing



I hope this helps. You could also take a look at MSDN and see what help they have. Depending on your OS this may or may not work. I am using W2000.

Thomas
 
Thanks I was actually trying to make an smtp server, but can't seem to figure how on earth the server is to resolve them servers from the email addresses to deliver them messages !!
 
Thomas,

You mention that you need the SMTP service set up correctly. Could you explain the steps to set it up correctly?

I assume that you mean MS SMTP Service in IIS? What if the server that the app is on has a 3rd party email server app running?

Sincerely,
Steve
 
I need for you to be more specific?

I am using MS SMTP but I am sure that it can work with others also. In my situation, behind a firewall, I needed to know what the "smarthost" was so that the information could get to the outside world.

In order for me to understand\detail I need to know the third party production you are talking about.

If you can provide more details I will try and help.

Thomas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top