This commit is contained in:
2022-03-19 22:52:06 +01:00
parent 9b001e5803
commit d9204781cf
139 changed files with 19394 additions and 3352 deletions

View File

@@ -144,7 +144,7 @@ Public Class cProgramFunctions
Try
wb.Worksheets(0).Range(r).Style.NumberFormat.SetFormat("###,###,##0.00 €")
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Next
End If
@@ -179,12 +179,12 @@ Public Class cProgramFunctions
Return filename
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Return Nothing
End Try
End Function
Public Shared Function sendMail(eMailTo, betreff, text, Optional eMailfrom = "support@verag.ag", Optional prio = False, Optional uhrzeitAngeben = True, Optional cc = "", Optional bcc = "", Optional anhaenge = Nothing)
Public Shared Function sendMail(eMailTo, betreff, text, Optional eMailfrom = "support@verag.ag", Optional prio = False, Optional uhrzeitAngeben = True, Optional cc = "", Optional bcc = "", Optional anhaenge = Nothing, Optional art = 0)
Dim Msg As New MailMessage
Dim myCredentials As New System.Net.NetworkCredential
Msg.IsBodyHtml = True
@@ -201,14 +201,26 @@ Public Class cProgramFunctions
mySmtpsvr.Host = "owa.verag.ag"
mySmtpsvr.Port = 587
Case "AMBAR"
' myCredentials.UserName = "office@ambarlog.com"
' myCredentials.Password = "Naq30716"
myCredentials.UserName = "import@ambarlog.com"
myCredentials.Password = "Meh062020"
mySmtpsvr.Host = "smtp.office365.com"
mySmtpsvr.Port = 587
mySmtpsvr.EnableSsl = True
' eMailfrom = "import@ambarlog.com"
Select Case art
Case "3", "4" 'Export
myCredentials.UserName = "office@ambarlog.com"
' myCredentials.Password = "Naq30716"
' myCredentials.UserName = "import@ambarlog.com"
myCredentials.Password = "Naq30716"
mySmtpsvr.Host = "smtp.office365.com"
mySmtpsvr.Port = 587
mySmtpsvr.EnableSsl = True
text = text.replace("import@ambarlog.com", "office@ambarlog.com")
eMailfrom = "office@ambarlog.com"
Case Else
myCredentials.UserName = "import@ambarlog.com"
myCredentials.Password = "Meh062020"
mySmtpsvr.Host = "smtp.office365.com"
mySmtpsvr.Port = 587
mySmtpsvr.EnableSsl = True
' eMailfrom = "import@ambarlog.com"
End Select
Case Else
myCredentials.UserName = "support@verag.ag"
myCredentials.Password = "$up0Rt2809!"
@@ -273,7 +285,7 @@ Public Class cProgramFunctions
mySmtpsvr.Send(Msg)
Catch ex3 As Exception
MsgBox(ex3.Message & ex3.StackTrace)
MsgBox(ex3.Message & ex3.StackTrace & vbNewLine & vbNewLine & "TO: " & eMailTo & vbNewLine & "cc: " & cc & vbNewLine & "bcc: " & bcc)
Return False
End Try
End Try
@@ -336,7 +348,7 @@ Public Class cProgramFunctions
mySmtpsvr.Send(Msg)
Catch ex2 As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try