hamed farza
hamed farza

Reputation:

Use Microsoft Exchange Email from Asp.net

I want to use/have an application that works like a mail box or better to say mail server, I mean I want to have a simple page that is linked to an exchange server in background, receives the needed information like sender, destination, subject, text message and finally the attachment, and then a send button that sends the mail to the destination by click (off course using the specified exchange server).

Any help would be appreciated

Upvotes: 1

Views: 1374

Answers (3)

Shoban
Shoban

Reputation: 23016

Send mail using .net

alt text
(source: developer.com)

Upvotes: 1

Andrew Lewis
Andrew Lewis

Reputation: 5256

    Imports System.Net.Mail

    Public Sub SendMail()
         Dim msg As New MailMessage("[email protected]", "[email protected]", "Your Subject Line", "The body of the message")
         Dim client = New SmtpClient("SERVERNAME")
         client.Send(msg)
    End Sub

Upvotes: 0

Wyatt Barnett
Wyatt Barnett

Reputation: 15663

Does it need to use MAPI or can it just use SMTP? If it is the former, good luck. No good components out there that I am aware of. If it is the latter, then you can just use the normal System.Net.Mail libraries. A finaly option, if you are on Exchange 2007 is to use the web services API, but I'm not familiar with it enough to know if you can actually send mail through it.

Upvotes: 0

Related Questions