Hallo zusammen,
in diesem Thread wurde schon einmal das Thema mit der Absender-Mailadresse angerissen:
http://atnotes.de/index.php?topic=53995.0Allerdings ist es hierbei so, dass als Absender immer die Usermailbox, gefolgt von "im Auftrag von [Mailboxname]" erscheint.
Gibt es hier eine Möglichkeit, die Absendermailbox so zu setzten, dass der Anwendername nicht sichtbar ist?
Für Outlook prüfe ich, welche Sessions (also Mailboxen) verbunden sind und wähle die entsprechende dann aus. Gibt es so etwas in VBA-Excel auch für Notes?
Hier der code, den ich aktuell für den Mailversand verwende:
| Public Function MailVersand_Notes(strVon As String, strMailTo As String, strCCTo As String, strBCCTo As String, _ |
| strSubject As String, strBodyText As String, blnReceipt As Boolean, strAttachment() As String) |
| |
| Dim objApp As Object |
| Dim objMail As Object |
| Dim objLotusDB As Object |
| Dim objLotusItem As Object |
| Dim strLotusUser As String |
| Dim strLotusDb As String |
| Dim intAttachCntr As Integer |
| |
| On Error GoTo ErrHandler |
| Set objApp = CreateObject("Notes.NotesSession") |
| strLotusUser = objApp.UserName |
| strLotusDb = Left$(strLotusUser, 1) & Right$(strLotusUser, (Len(strLotusUser) - InStr(1, strLotusUser, " "))) & ".nsf" |
| Set objLotusDB = objApp.GETDATABASE("", strLotusDb) |
| If Not objLotusDB.IsOpen Then |
| objLotusDB.OPENMAIL |
| End If |
| Set objMail = objLotusDB.CREATEDOCUMENT |
| Set objLotusItem = objMail.CREATERICHTEXTITEM("BODY") |
| |
| With objMail |
| |
| |
| .Form = "Memo" |
| .sendTo = Split(strMailTo, ",") |
| If Len(strCCTo) > 0 Then .CopyTo = Split(strCCTo, ",") |
| If Len(strBCCTo) > 0 Then .BlindCopyTo = Split(strBCCTo, ",") |
| .Subject = strSubject |
| .Principal = strVon |
| .Body = strBodyText |
| .posteddate = Now() |
| If blnReceipt Then .ReturnReceipt = "1" |
| .SaveMessageOnSend = True |
| For intAttachCntr = 0 To UBound(strAttachment) |
| Call objLotusItem.EmbedObject(1454, vbNullString, _ |
| strAttachment(intAttachCntr), "") |
| Next intAttachCntr |
| .visible = True |
| .Send False |
| End With |
| |
| CleanUp: |
| Set objLotusDB = Nothing |
| Set objLotusItem = Nothing |
| Set objApp = Nothing |
| Set objMail = Nothing |
| Exit Function |
| ErrHandler: |
| Call WriteErrorLog(999, Err.Source, 0, Err.description, "Mailversand_Notes", True, False) |
| GoTo CleanUp |
| End Function |
Besten Dank schonmal und Grüße