P
Pablo A Castillo
hey I use this code, I want to send a email all tha days (hour: 8:00 AM), but
my code has somes problems.
Code:
Protected Overrides Sub OnStart(ByVal args() As String)
WriteToLog()
End Sub
Protected Overrides Sub OnStop()
End Sub
Private Sub WriteToLog()
Dim oApp As Microsoft.Office.Interop.Outlook.Application = New
Microsoft.Office.Interop.Outlook.Application()
Dim eMail As Microsoft.Office.Interop.Outlook.MailItem =
oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem)
Dim subjectEmail As String = "Test de envio de emails desde ASP.NET"
Dim bodyEmail As String = "test de envio de emails desde ASP.NET"
Dim sentContacts As Microsoft.Office.Interop.Outlook.MAPIFolder =
oApp.ActiveExplorer.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderContacts)
With eMail
.Subject = "hey" 'TextBox2.Text
.To = "(e-mail address removed)" 'TextBox1.Text
.Body = "TextBox8.Text"
.Importance =
Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh
.Send()
End With
End Sub
this dont send the email!
thanks,
Pablo
my code has somes problems.
Code:
Protected Overrides Sub OnStart(ByVal args() As String)
WriteToLog()
End Sub
Protected Overrides Sub OnStop()
End Sub
Private Sub WriteToLog()
Dim oApp As Microsoft.Office.Interop.Outlook.Application = New
Microsoft.Office.Interop.Outlook.Application()
Dim eMail As Microsoft.Office.Interop.Outlook.MailItem =
oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem)
Dim subjectEmail As String = "Test de envio de emails desde ASP.NET"
Dim bodyEmail As String = "test de envio de emails desde ASP.NET"
Dim sentContacts As Microsoft.Office.Interop.Outlook.MAPIFolder =
oApp.ActiveExplorer.Session.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderContacts)
With eMail
.Subject = "hey" 'TextBox2.Text
.To = "(e-mail address removed)" 'TextBox1.Text
.Body = "TextBox8.Text"
.Importance =
Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh
.Send()
End With
End Sub
this dont send the email!
thanks,
Pablo