I need ASP exchange server mail code

Discussion in '.NET' started by puneet, Jul 7, 2011.

  1. puneet

    puneet

    Joined:
    Jul 7, 2011
    Messages:
    2
    Location:
    India-Delhi
    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") = "dialhr.eng-in@gdfsuez.com"

    '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)
    %>

    ==================
    puneet, Jul 7, 2011
    #1
    1. Advertising

  2. puneet

    puneet

    Joined:
    Jul 7, 2011
    Messages:
    2
    Location:
    India-Delhi
    Friends i am wating for ur reply.
    puneet, Jul 18, 2011
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZmFoYWRvbWFu?=

    How to send an e-mail from asp .net using exchange server?

    =?Utf-8?B?ZmFoYWRvbWFu?=, Jul 26, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    4,047
    Landi
    Jul 26, 2005
  2. www.westerncartooncards.ca

    Exchange Links < Western Cartoon Cards > Exchange Links

    www.westerncartooncards.ca, Jul 12, 2004, in forum: HTML
    Replies:
    2
    Views:
    1,227
    Toby Inkster
    Jul 12, 2004
  3. martin smith
    Replies:
    3
    Views:
    329
    Jeff Cochran
    Mar 21, 2005
  4. Alessandro Barracco

    matrix: exchange rows + exchange columns

    Alessandro Barracco, Jan 25, 2011, in forum: Ruby
    Replies:
    0
    Views:
    154
    Alessandro Barracco
    Jan 25, 2011
  5. bkimelman@hotmail.com

    Need help sending mail through an Exchange Server

    bkimelman@hotmail.com, May 16, 2005, in forum: Perl Misc
    Replies:
    2
    Views:
    478
    newsbot@cox.net
    May 16, 2005
Loading...

Share This Page