Results 1 to 2 of 2

Thread: Sending email using Exchange server and authentication

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Sending email using Exchange server and authentication

    I need to send emails using an Exchange server which required authentication. Anyone can help me?
    I've read several things about sending emails using SMTP (with System.Net.Mail) and none of those seem to work (SMTP and Exchange? I dont even know the relation)

    help!
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Fanatic Member Jumpercables's Avatar
    Join Date
    Jul 2005
    Location
    Colorado
    Posts
    592

    Re: Sending email using Exchange server and authentication

    This is a shot in the dark but try using System.Net.Sockets and System.Net.Security namespace, maybe you need to use the Authentica in the SSLStream somehow...

    Code:
    private TcpClient oTcpClient;  
    private SslStream oSslStream;
    
    try
    {   
        // Attempt to connect to the remote server.
        oTcpClient = new TcpClient(m_Server, m_Port);
        oSslStream = new SslStream(oTcpClient.GetStream());
        oSslStream.AuthenticateAsClient(m_Server);
    }
    catch(Exception  e)
    {
         System.Diagnostics.Debug.WriteLine(e.Message);
    }

    C# - .NET 1.1 / .NET 2.0

    "Take everything I say with a grain of salt, sometimes I'm right, sometimes I'm wrong but in the end we've both learned something."
    _____________________
    Regular Expressions Library
    Connection String
    API Functions
    Database FAQ & Tutorial

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width