Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > I need ASP exchange server mail code

Reply
Thread Tools

I need ASP exchange server mail code

 
 
puneet puneet is offline
Junior Member
Join Date: Jul 2011
Location: India-Delhi
Posts: 2
 
      07-07-2011
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 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)
%>

==================
 
Reply With Quote
 
 
 
 
puneet puneet is offline
Junior Member
Join Date: Jul 2011
Location: India-Delhi
Posts: 2
 
      07-18-2011
Friends i am wating for ur reply.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot send mail from Exchange 2007 mailbox to Exchange 2003 mailb =?Utf-8?B?am9zdWU=?= MCSE 3 08-15-2007 12:02 PM
How to send an e-mail from asp .net using exchange server? =?Utf-8?B?ZmFoYWRvbWFu?= ASP .Net 1 07-26-2005 03:46 PM
Need help sending mail through an Exchange Server bkimelman@hotmail.com Perl Misc 2 05-16-2005 05:50 PM
Sending Mail Using ASP/VBScript to Exchange Mail Box martin smith ASP General 3 03-21-2005 06:45 PM
Configuring SQL Server with Mail Session(Exchange Server) Aibak MCSE 3 04-08-2004 07:04 AM



Advertisments