Domino 9 und frühere Versionen > Entwicklung
MailSend Absenderadresse Ändern
Christopher:
Hallo Entwickler,
ich habe eine Schaltfläche wo der Nutzer(Dau) ein Dokument Speichert und anschließend ein Mail erhält. Es gefällt mir aber nicht das in der Mail der Nutzer der das Dokument gespeichert als Absender steht.
Gib es bei Mailsend die Absenderadress zu beeinflussen?
Mein Formel sieht so aus:
@MailSend(DBNameJa;"";"";"Auftrag von HelpDesk IT-Untterstützung";
"Ihr Auftrag ist beim HelpDesk IT-Unterstützung eingegangen."+" Bei Anfragen bitte Ihre Auftragsnummer angeben: " +DBAuftragsNr;"")
Gruß Christopher
eknori:
Hallo Christopher,
hab mal wieder nur ne Script Lösung parat: :'(
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
Christopher:
Guten Morgen Ulrich danke für Deine Antwort zu so früher Stunde werde es mal gleich ausprobieren.
Gruß
Christopher
Hasi:
??? Ich habe das ganze auch ausprobiert, und es funtioniert leider immer noch nicht !
Mein Code :
Dim docMemo As New NOTESDOCUMENT(db)
Dim bodyField As New NOTESRICHTEXTITEM(docMemo, "Body")
Dim userAddress As String
Dim firstName As String
'myServer Variable definieren und inizialisieren
Dim session As New NotesSession
Dim myDatabase As NotesDataBase
Dim myServer As String
Dim pos As Integer
Set myDatabase=Session.CurrentDataBase
myServer=myDatabase.Server
'hier wird der Server Name mit "Instr" und "Mid$" herraus operiert!!!
If myServer <> "" Then
pos = Instr(myServer,"CN=") 'position of the string "CN="
If pos > 0 Then
myServer = Mid$(myServer,pos+3,7) 'seven characters after the string "CN="
End If
End If
userAddress = docPerson.GetItemValue("MailAddress")(0)
firstName = docPerson.GetItemValue("FirstName")(0)
Call docMemo.ReplaceItemValue("Form","Memo")
Call docMemo.ReplaceItemValue("SendTo", userAddress)
Call docMemo.ReplaceItemValue("Subject","*Your PERIS Self-Service account information")
Call docMemo.ReplaceItemValue("From","Self-Service.PERIS@swisscom.com")
Call docMemo.ReplaceItemValue("SendFrom","Self-Service.PERIS@swisscom.com")
Call docMemo.ReplaceItemValue("Principal","Self-Service.PERIS@swisscom.com")
Call docMemo.ReplaceItemValue("ReplyTo","Self-Service.PERIS@swisscom.com")
'Mitteilung in Deutsch
Call bodyField.APPENDTEXT("Deutsch")
Call bodyField.ADDNEWLINE(2)
Call bodyField.APPENDTEXT("Liebe Benutzerin, lieber Benutzer")
Call bodyField.ADDNEWLINE(2)
Call bodyField.APPENDTEXT("Ihr Benutzername lautet: " & doc.GetItemValue("FullName")(0))
Call bodyField.ADDNEWLINE(1)
Call bodyField.APPENDTEXT("Ihr neues Passwort lautet: " & doc.GetItemValue("NewPassword")(0))
Call bodyField.ADDNEWLINE(2)
Call bodyField.APPENDTEXT("Falls Sie das Passwort ändern wollen, benutzen Sie den folgenden Link")
Call bodyField.ADDNEWLINE(1)
Call bodyField.APPENDTEXT("und klicken dann auf Employee / Verwalten / 'Passwort ändern'")
Call bodyField.ADDNEWLINE(1)
Call bodyField.APPENDTEXT("Ihr PERIS Team")
Call bodyField.ADDNEWLINE(2)
'Call bodyField.APPENDTEXT("http://"& myServer &"/swisscom/ws_shd.nsf")
Call bodyField.APPENDTEXT("https://ESSPERIS")
Call bodyField.ADDNEWLINE(3)
'Mitteilung in Französisch
Call bodyField.APPENDTEXT("Français")
Call bodyField.ADDNEWLINE(2)
Call bodyField.APPENDTEXT("Chère utilisatrice, cher utilisateur ")
Call bodyField.ADDNEWLINE(2)
Call bodyField.APPENDTEXT("Votre nom d'utilisateur est le suivant: " & doc.GetItemValue("FullName")(0))
Call bodyField.ADDNEWLINE(1)
Call bodyField.APPENDTEXT("Votre nouveau mot de passe est le suivant: " & doc.GetItemValue("NewPassword")(0))
Call bodyField.ADDNEWLINE(2)
Call bodyField.APPENDTEXT("Si vous désirez changer de mot de passe, veuillez utiliser le lien suivant")
Call bodyField.ADDNEWLINE(1)
Call bodyField.APPENDTEXT("et cliquer ensuite sur Employee / Administrer / 'Changer le mot de passe'.")
Call bodyField.ADDNEWLINE(1)
Call bodyField.APPENDTEXT("Votre équipe PERIS")
Call bodyField.ADDNEWLINE(2)
'Call bodyField.APPENDTEXT("http://"& myServer &"/swisscom/ws_shd.nsf")
Call bodyField.APPENDTEXT("https://ESSPERIS")
Call bodyField.ADDNEWLINE(3)
'Mitteilung in Italiano
Call bodyField.APPENDTEXT("Italiano")
Call bodyField.ADDNEWLINE(2)
Call bodyField.APPENDTEXT("Gentile utente")
Call bodyField.ADDNEWLINE(2)
Call bodyField.APPENDTEXT("Il Suo nome di utente è: " & doc.GetItemValue("FullName")(0))
Call bodyField.ADDNEWLINE(1)
Call bodyField.APPENDTEXT("La Sua nuova password è: " & doc.GetItemValue("NewPassword")(0))
Call bodyField.ADDNEWLINE(2)
Call bodyField.APPENDTEXT("Se vuole modificare la password attivi il seguente link")
Call bodyField.ADDNEWLINE(1)
Call bodyField.APPENDTEXT("e poi clicchi su Employee / Amministrare / 'Modicare password'.")
Call bodyField.ADDNEWLINE(1)
Call bodyField.APPENDTEXT("Il Suo PERIS team")
Call bodyField.ADDNEWLINE(2)
'Call bodyField.APPENDTEXT("http://"& myServer &"/swisscom/ws_shd.nsf")
Call bodyField.APPENDTEXT("https://ESSPERIS")
Call bodyField.ADDNEWLINE(3)
'Mitteilung in Englisch
Call bodyField.APPENDTEXT("English")
Call bodyField.ADDNEWLINE(2)
Call bodyField.APPENDTEXT("Dear User")
Call bodyField.ADDNEWLINE(2)
Call bodyField.APPENDTEXT("Your username is: " & doc.GetItemValue("FullName")(0))
Call bodyField.ADDNEWLINE(1)
Call bodyField.APPENDTEXT("Your new password is: " & doc.GetItemValue("NewPassword")(0))
Call bodyField.ADDNEWLINE(2)
Call bodyField.APPENDTEXT("If you wish to change your password, please use the following link")
Call bodyField.ADDNEWLINE(1)
Call bodyField.APPENDTEXT("and then click on Employee / Manage / 'Change Password'.")
Call bodyField.ADDNEWLINE(1)
Call bodyField.APPENDTEXT("Your PERIS Team")
Call bodyField.ADDNEWLINE(2)
'Call bodyField.APPENDTEXT("http://"& myServer &"/swisscom/ws_shd.nsf")
Call bodyField.APPENDTEXT("https://ESSPERIS")
Call bodyField.ADDNEWLINE(3)
Call docMemo.Send(False)
Hilfe !!!!!!!!!!!!!!
gpeters:
Hallo eknori,
wir haben ein ähnliches System im Einsatz (R4.6). Hast Du damit praktische Erfahrungen im R5 Bereich? Offiziell ist das befummeln der mail.box doch nicht freigegeben. Und bei "multiple mail.boxes" die dann ja anscheinend mail1,box usw, heißen - geht es da auch?
Die Antworten würden mir bei der R5 Migration ein wenig helfen. Wenn nicht, wir testen ehh - und dann habe ich mal was zu berichten.
Gerald
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln