Trying send mails and attachments via Outlook
Posted: Sat Mar 16, 2019 1:03 pm
Hi guys,
I am trying to port my Vulcan app that worked to X# however I get error after error. Currently my problem is Interop to Outlook. Could you please indicate what I need to upload for assistance? I had everything working in Viulcan.Net but strangely I get compile errors of
code thatz is running in my application the Try and Catch routines for Database I keep getting errors and cannot implement any mail features in X#. I cannot even get this simple code to run.
LOCAL oApp AS Microsoft.Office.Interop.Outlook.Application
LOCAL oAppt AS _MailItem
LOCAL oItemType AS OlItemType
oApp := Microsoft.Office.Interop.Outlook.Application{}
oItemType := OlItemType.OlMailitem
oAppt:= (_Mailitem)oApp:CreateItem(oItemtype)
*oContact := (ContactItem)oOutlook:CreateItem(oItemType)
*oAppt := oApp:CreateItem(oItemtype)
oAppt:@@To := "rn@warner-it.com"
oAppt:Subject := "Test Mail"
oAppt:Body := "Hello This is a Test Mail"
oAppt:Send()
// Clean up.
oApp := Null_oBject
oAppt := Null_oBject
When you icliude the outlook Interop this code below is show as errors and this code works well currently without Outlook.Interop
TRY
SELF:Tda:InsertCommand := OledbCommand{cStatement2, oConn1}
cmd := SELF:Tda:InsertCommand
cmd:ExecuteNonQuery()
*messagebox.show("Alle Daten Satze erfolgreich gelöscht !!!! ")
CATCH ex AS exception
messageBox.show("Fehler beim löschen !!! "+ex:Message:ToString())
END TRY
I would appreciaqte some help as I am currently stuck
Thanks and Regards
Raymond
I am trying to port my Vulcan app that worked to X# however I get error after error. Currently my problem is Interop to Outlook. Could you please indicate what I need to upload for assistance? I had everything working in Viulcan.Net but strangely I get compile errors of
code thatz is running in my application the Try and Catch routines for Database I keep getting errors and cannot implement any mail features in X#. I cannot even get this simple code to run.
LOCAL oApp AS Microsoft.Office.Interop.Outlook.Application
LOCAL oAppt AS _MailItem
LOCAL oItemType AS OlItemType
oApp := Microsoft.Office.Interop.Outlook.Application{}
oItemType := OlItemType.OlMailitem
oAppt:= (_Mailitem)oApp:CreateItem(oItemtype)
*oContact := (ContactItem)oOutlook:CreateItem(oItemType)
*oAppt := oApp:CreateItem(oItemtype)
oAppt:@@To := "rn@warner-it.com"
oAppt:Subject := "Test Mail"
oAppt:Body := "Hello This is a Test Mail"
oAppt:Send()
// Clean up.
oApp := Null_oBject
oAppt := Null_oBject
When you icliude the outlook Interop this code below is show as errors and this code works well currently without Outlook.Interop
TRY
SELF:Tda:InsertCommand := OledbCommand{cStatement2, oConn1}
cmd := SELF:Tda:InsertCommand
cmd:ExecuteNonQuery()
*messagebox.show("Alle Daten Satze erfolgreich gelöscht !!!! ")
CATCH ex AS exception
messageBox.show("Fehler beim löschen !!! "+ex:Message:ToString())
END TRY
I would appreciaqte some help as I am currently stuck
Thanks and Regards
Raymond