Domino 9 und frühere Versionen > ND6: Entwicklung
Empfangenes Mail leider immer im Editmode
m3:
--- Zitat von: robertpp am 30.11.07 - 12:12:03 ---So jetzt hab ich auch das Problem, dass mein Link auch im Outlook funktionieren soll nur ist es dort auch nur ein reiner Text!
--- Ende Zitat ---
Hmmmm.
Ich würd mal mit NotesMIMEEntity.ContentType auch einen korrekten Content-Type (text/html) setzten.
Ansonsten zeig mal die Mail her, wie sie im Outlool ankommt.
robertpp:
Ich hab das Script jetzt schon so angepasst dass es jetzt so aussieht:
--- Code: --- Dim s As New NotesSession
Dim db As NotesDatabase
Dim GroupDoc As NotesDocument
Dim view As NotesView
Dim body As NotesMIMEEntity
Dim stream As NotesStream
Dim tmpURL As String
Dim item As NotesItem
Dim memo As NotesDocument
Dim htmlbeforeurl As String, htmlafterurl As String
Dim mailbox As New NotesDatabase("","")
Dim URL As String
Dim SendTo As Variant
Dim CopyTo As Variant
Dim sendas As String
Set db = s.CurrentDatabase
Set view = db.GetView ( "($Group)" )
Set GroupDoc = view.GetDocumentByKey ( doc.Sendto(0) ) 'field sendto = Groupfield
SendTo = GroupDoc.Manager
CopyTo = doc.Copyto(0)
sendas = optiondoc.GetItemValue("SendFrom")(0)
URL = "Server/(ActivateUser)?OpenAgent&UserID=" + doc.UserID(0)
s.ConvertMIME = False
Set stream = s.CreateStream
Call mailbox.Open("Server","mail.box")
If mailbox.IsOpen Then
Set memo = mailbox.CreateDocument
With memo
.From = sendas
.SendFrom = sendas
.Form="memo"
.Subject = "Activate User"
.SendTo = SendTo
.CopyTo = CopyTo
.RecNoOutOfOffice = "1" 'Set it so out of office agents don't reply to the message
Set body = .CreateMIMEEntity
Set item = .ReplaceItemValue("Recipients", SendTo)
Call item.AppendToTextList(.CopyTo(0))
htmlbeforeurl = _
|<font face="Arial" size="2">Hi,<br><br>
There is a new user to activate:<br><br>
Username is: | +doc.Username(0) + |<br>
Email is: | +doc.email(0) + |<br>
<br></font>
|
Call stream.WriteText(htmlbeforeurl)
tmpURL = |<font face="Arial" size="2"><a href='| + URL + |'>Click Here to activate user</a></font><br>|
Call stream.WriteText(tmpURL)
htmlafterurl = _
|<font face="Arial" size="2"><br>
Best Regards<br>
Team
</font>
|
Call stream.WriteText(htmlafterurl)
' Ensure the MIME content will be recognized as HTML (Must be after the stream is written)
Call body.SetContentFromText(stream, "text/html",ENC_NONE)
' Call stream.Truncate
.PostedDate = Now()
.ComposedDate = Now()
.DeliveredDate = Now()
.EncryptOnSend = False
Call .Save( True, False )
End With
End If
s.ConvertMIME = True ' Restore conversion
--- Ende Code ---
Somit sollte der Content-Type auch passen!
Der link ist einfach nur noch Text!
m3:
Mach mal aus
--- Code: ---URL = "Server/(ActivateUser)?OpenAgent&UserID=" + doc.UserID(0)
--- Ende Code ---
eine richtige URL
--- Code: ---URL = "http://Server/(ActivateUser)?OpenAgent&UserID=" + doc.UserID(0)
--- Ende Code ---
robertpp:
Martin,
sorry ist nur beim Anonymisieren von mir so gelöscht worden:
Link sieht im Script eh so aus:
--- Code: ---URL = "http://Server/bla.nsf/(ActivateUser)?OpenAgent&UserID=" + doc.UserID(0)
--- Ende Code ---
Sonst noch einen Tipp?
Sollte das grundsätzlich so funkionieren oder ist da beim Routing oder Servereinstellung irgendetwas zu beachten?
danke Robert
m3:
Wie gesagt, post mal, wie das im Outlool aussieht, so tu ich mir schwer, was zu sagen.
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln