rmc, datev, faktEmail
This commit is contained in:
@@ -311,7 +311,25 @@ Public Class frmFaktEmail
|
||||
Mail = outl.CreateItem(0)
|
||||
Mail.Subject = txtSubject.Text
|
||||
|
||||
If Firma_ID = 24 Then Mail.SentOnBehalfOfName = SDL.cFakturierung.getDefaultMail("AMBAR",, True)
|
||||
If Firma_ID = 24 Then
|
||||
Try
|
||||
Dim oAccount As Outlook.Account
|
||||
Dim accountToSent = SDL.cFakturierung.getDefaultMail("AMBAR",, True)
|
||||
|
||||
|
||||
If outl.Session.Accounts.Count > 0 Then
|
||||
For Each oAccount In outl.Session.Accounts
|
||||
If oAccount.SmtpAddress = accountToSent Then
|
||||
Mail.SendUsingAccount = oAccount
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Ermitteln des Mail-Accounts." & ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
'Mail-Adressen eintragen
|
||||
'-----------------------------------------------------------------
|
||||
@@ -406,7 +424,25 @@ Public Class frmFaktEmail
|
||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||
Mail = outl.CreateItem(0)
|
||||
|
||||
If Firma_ID = 24 Then Mail.SentOnBehalfOfName = SDL.cFakturierung.getDefaultMail("AMBAR",, True)
|
||||
If Firma_ID = 24 Then
|
||||
Try
|
||||
Dim oAccount As Outlook.Account
|
||||
Dim accountToSent = SDL.cFakturierung.getDefaultMail("AMBAR",, True)
|
||||
|
||||
|
||||
If outl.Session.Accounts.Count > 0 Then
|
||||
For Each oAccount In outl.Session.Accounts
|
||||
If oAccount.SmtpAddress = accountToSent Then
|
||||
Mail.SendUsingAccount = oAccount
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Ermitteln des Mail-Accounts." & ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
'Mail-Adressen eintragen
|
||||
'-----------------------------------------------------------------
|
||||
@@ -447,8 +483,7 @@ Public Class frmFaktEmail
|
||||
txtSubject.Text = txtSubject.Text.Replace("%RgNr%", RechnungsNr) & abfNr
|
||||
|
||||
|
||||
Dim TextHTML = "<div style=""font-family:Calibri, Arial"">" & RichTextBox.Text.Replace(ControlChars.Lf, "<br>") & cFakturierung.getSignature(RECHNUNG.RechnungsLandKz, RECHNUNG.Firma_ID,,,, additionalLine) & "</div>"
|
||||
|
||||
Dim TextHTML = "<div style=""font-family:Calibri, Arial"">" & RichTextBox.Text.Replace(ControlChars.Lf, "<br>") & cFakturierung.getSignature(RECHNUNG.RechnungsLandKz, RECHNUNG.Firma_ID,,,, additionalLine,, IIf(Firma_ID = "24", True, False)) & "</div>"
|
||||
|
||||
Mail.HTMLBody = TextHTML
|
||||
Mail.Subject = txtSubject.Text
|
||||
|
||||
Reference in New Issue
Block a user