I need ASP exchange server mail code

Joined
Jul 7, 2011
Messages
2
Reaction score
0
Hi Friends,

i develop software in ASP for my company In this software i am using SMTP for sending email. Now we are using exchange server for emails, so i need code for this. currently i am using given below code. Can anyone help me?

==================

'==This section provides the configuration information for the remote SMTP server.

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "10.224.40.14" 'dbserver1.tractebel.net.in smtp.gmail.com

'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = true'1'cdoBasic

'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "(e-mail address removed)"

'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "dialhr"'---------password

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 0

'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

If intSendUsing = 1 Then
'objMessage.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup"
End If

objMessage.Configuration.Fields.Update

'==End remote SMTP server configuration section==
on error resume next
objMessage.Send
if err<>0 then
'Response.Write(err.File&"<br />")
Response.Write(err.Number&"<br />")
Response.Write(err.Description&"<br />")
Response.Write(err.Source&"<br />")
else
Response.Write("<br />Message Send... :)<br/>" & txtBodyT)
end if
Response.Write("<br />Message Send... :)<br/>" & txtBodyT)
%>

==================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top