Domino 9 und frühere Versionen > Entwicklung
Absender bei einer Mail bestimmen
Obrac:
Ja, hab ich mir schon gedacht. Ich würde meine Lösung dennnoch vorschlagen.
eknori:
Function SpoofMessage( Byval sendas As String, Byval sendto As String, subject As
String, message As String )
Dim session As New NotesSession
Dim current As NotesDatabase
Dim mailbox As New NotesDatabase("","")
Dim maildoc As NotesDocument
Dim rtitem As NotesRichTextItem
' get handle to mail.box on the users current mail server
Set current = session.CurrentDatabase
Call mailbox.Open( current.server, "mail.box" )
' Create a new document in the severs mail box
Set maildoc = mailbox.CreateDocument
maildoc.Form = "Memo"
maildoc.From = sendas
maildoc.SendFrom = sendas
maildoc.SendTo = sendto
maildoc.Recipients = sendto
maildoc.Subject = subject
Set rtitem = maildoc.CreateRichTextItem( "Body" )
Call rtitem.AppendText( message )
maildoc.PostedDate = Now()
maildoc.ComposedDate = Now()
maildoc.DeliveredDate = Now()
maildoc.Principal = sendas
maildoc.EncryptOnSend = False
Call maildoc.Save( True, False )
End Function
harkpabst_meliantrop:
--- Zitat von: eknori am 28.04.03 - 12:34:00 ---maildoc.Principal = sendas
--- Ende Zitat ---
Nochmal zur Verdeutlichung, falls Gravedigger vom Code erschlagen worden sein sollte ;) :
Das Feld muss "Principal" heißen.
Navigation
[0] Themen-Index
[*] Vorherige Sete
Zur normalen Ansicht wechseln