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!

find out programatically whats available on the server to send email

Status
Not open for further replies.

csphard

Programmer
Apr 5, 2002
194
US
I am having problems sending email.
Something that did work stopped working.
I think something changeds on the server.

I use System.Web.Mail.MailMessage through a vb app

and
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
with an asp app

They both have stopped working

How can I find out programatically whats available on the server.

Howard
 
code I am using (can anyone see any problems. it works with one ip address and not with the other)

Dim iMsg
Dim iConf
Dim Flds
Dim strHTML

Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

' Set the CDOSYS configuration fields to use port 25 on the SMTP server.

With Flds
.Item(" = cdoSendUsingPort
'ToDo: Enter name or IP address of remote SMTP server.
.Item(" = "dsmtpserver"
.Item(" = 25
.Update
End With

'load information
strSubject = "Forgotten Password on " & dtNow

' Build HTML for message body.

strHTML = strHTML & "<font face=Arial>Dear " & rs("fname")
strHTML = strHTML & "<br>"
strHTML = strHTML & "Thank you for the opportunity to serve you. </font>"


' Apply the settings to the message.
With iMsg
Set .Configuration = iConf
.To = strEmail
.From = "test@test.org"
.Subject = strSubject
.HTMLBody = strHTML
.Send
End With
'response.write "4"
'response.end
' Clean up variables.
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

'response.write "Mail Sent!"
'response.end
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top