473,396 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Sending Email via exchange Server

Does anyone know how to send a email from VB.net vie the exchange and the
outlook client setup in the machine where the application is going to run. I
tried the web thing but it did not work, the mail need to go vie exchannge.

Thanks
Nov 21 '05 #1
2 10361
This is the Procedure I use and it work fine. Just make sure you put the
Imports statement at the top of your class/module

HTH,
Jim

Imports System.Web.Mail

Private Sub SendMailMessage(ByVal MailTo As String, ByVal Subject As String,
ByVal HTMLMessage As String)
Dim MailMessage As Web.Mail.MailMessage = New Web.Mail.MailMessage

With MailMessage
.From = "Sy******@YourDomain.com"
.To = MailTo
.Subject = Subject
.BodyFormat = MailFormat.Html
.Body = HTMLMessage
End With

Web.Mail.SmtpMail.SmtpServer = "ExchangeServerName"
Web.Mail.SmtpMail.Send(MailMessage)
End Sub

"Carlos" <cp@swa.com> wrote in message
news:e2*************@TK2MSFTNGP12.phx.gbl...
Does anyone know how to send a email from VB.net vie the exchange and the
outlook client setup in the machine where the application is going to run.
I tried the web thing but it did not work, the mail need to go vie
exchannge.

Thanks


Nov 21 '05 #2
Hi

Also I think you may try the WebDav approach.
Sending a Message (WebDAV)
http://msdn.microsoft.com/library/de...us/e2k3/e2k3/_
esdk_sending_a_message_webdav.asp

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brian Henry | last post by:
Does anyone know how to send an email to an internal exchange server (internal email only, how you can send email to a username in active directory in exchange with out a domain (@domain.com) after...
2
by: Rob Meade | last post by:
Hi all, I have no knowledge of Exchange server, and have always used CDO to send emails from ASP in the past. My problem now is that the server in question doesn't have SMTP installed alongside...
2
by: Eric Timely | last post by:
After a trust with exchange server established the xp_SendMail gives the following error: xp_sendmail: failed with mail error 0x80070005 Prior to the trust everything worked fine. I have...
17
by: Bonj | last post by:
Right guys. (I would like a solution to this in VB6 as this is what our needy app is written in, but any solutions that involve .NET would be much appreciated likewise as I could instantiate...
2
by: RedEye | last post by:
Hello, I am trying to create a class to send email via POP3 or Exchange. Everything works fine when sending via POP3 but fails when sending via exchange. Error: Could not access 'CDO.Message'...
2
by: Jim in Arizona | last post by:
I've made an application that is a computer problems (tickets) system. The employee goes to a web page and posts the comptuer problem they're having. Then, the IS staff goes to another webpage...
8
by: Frank | last post by:
I think I've confused myself completely here :-) I have used System.Web.Mail, but am not sure if this works with Exchange Server 5.5. I asked the client if they're email server supported SMTP, and...
1
by: Gilbert Cheung | last post by:
Hello. I am writing a website for my company. There is a sign-up form that requires us to send a confirmation email to our customer. Our company uses Exchange Server 2000 as our mail server. We...
8
by: Michel Posseth [MCP] | last post by:
Hi does someone has experience with this ?? i have made a lot of apps in the past that were capable of sending e-mails the server i then talked to was a Linux SMTP server and it worked great ...
2
abdoelmasry
by: abdoelmasry | last post by:
Hi men i have big problem with microsoft exchange server 2003 i installed exchange server as main mail server to use it on in company i have static real ip address im sending and...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.