Ricky
New Member
- OS Version(s)
- Windows
- Outlook version
- Outlook 365 64 bit
- Email Account
- Office 365 Exchange
Operating system:: Windows
Outlook version: Outlook 365
Email type or host: Microsoft 365
Outlook version: Outlook 365
Email type or host: Microsoft 365
I'm trying to send emails with my VB .Net, but I'm having an issue with the send command.
Here's the code I'm using.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim oApp As Outlook.Application
oApp = New Outlook.Application
Dim oMsg As Outlook.MailItem
oMsg = oApp.CreateItem(Outlook.OlItemType.olMailItem)
oMsg.Recipients.Add("rickykreidl@gmail.com")
oMsg.Subject = "Testing"
oMsg.Body = "this is a test"
oMsg.Display()
oMsg.Send()
End Sub
Error hits on the oMsg.Send() command
Here's the code I'm using.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim oApp As Outlook.Application
oApp = New Outlook.Application
Dim oMsg As Outlook.MailItem
oMsg = oApp.CreateItem(Outlook.OlItemType.olMailItem)
oMsg.Recipients.Add("rickykreidl@gmail.com")
oMsg.Subject = "Testing"
oMsg.Body = "this is a test"
oMsg.Display()
oMsg.Send()
End Sub
Error hits on the oMsg.Send() command