Notes ID:
PCSAdmin LSBSAdmin
问题: 我有一个自动发送邮件的代理。我们可以编辑发件人成为其他人而不是签署代理的人吗?
案例:
Lotus脚本
Dim maildoc As NotesDocument
Dim body As NotesMIMEEntity, header As NotesMIMEHeader, stream As NotesStream
Dim child As NotesMIMEEntity
Set stream = s.Createstream()
s.Convertmime = False
Set maildoc = db.Createdocument()
maildoc.Form = "Memo"
Set body = maildoc.Createmimeentity
Set header = body.Createheader("Subject")
Call header.Setheaderval("NOTIFICATION Email")
Set header = body.Createheader("To") ' Send to/to
Call header.Setheaderval("personname")
Set header = body.Createheader("CopyTo") ' Copy To/cc
Call header.Setheaderval("Personname")
Call stream.Writetext(|<html><body>|)
Call stream.Writetext(|<b>Dear | + lsdoc.Getitemvalue("Name")(0) + |,</b><br>|)
Call stream.Writetext(|<p>|+ "Attached herewith is the FORM for Application for Renewal of application <b>"+ sadoc.name(0)+|</b>.</p>|)
Call stream.Writetext(|<p>| + "Please complete the FORM and send by email to <b>"+MailAddress+"</b>" +_
", with the subject '<b>RENEWAL Application</b>'" + |</p>|)
Call stream.Writetext(|<p> Thank you </p>|)
Call stream.Writetext(|<p> </p>|)
Call stream.Writetext(|Secretary<br>|)
Call stream.Writetext(|Company<br>|)
Call stream.Writetext(|<em>(No signature is required on this computer generated document)</em><br>|)
Call stream.Writetext(|</body></html>|)
Set child = body.Createchildentity()
Call child.Setcontentfromtext(stream, "text/HTML;charset=iso-8859-1", ENC_NONE)
Call stream.Close()
Call stream.Truncate()
Set child = body.Createchildentity()
Set header = child.Createheader("Content-Type")
Call header.Setheaderval("multipart/mixed")
Set header = child.Createheader("Content-Disposition")
Call header.Setheaderval(|attachment; filename="| + xlfilename + |"|)
Set header = child.Createheader("Content-ID")
Call header.Setheaderval(|"| + xlfilename + |"|)
Set stream = s.Createstream()
If Not stream.Open(template, "binary") Then
Print "Unable to open " + template
End If
If stream.Bytes = 0 Then
Print template + " has no content"
End If
Call child.Setcontentfrombytes(stream, "application/vnd.ms-excel", ENC_IDENTITY_BINARY)
Call stream.Close()
Call stream.Truncate()
Call maildoc.Send(False)
Print "Email sent"
s.Convertmime = True
答案 0 :(得分:2)
查看我的答案to this earlier question和this question, too以及Knut's answer to yet another question。
IBM支持的最佳方法是使用Principal字段,但它并不完全隐藏发件人身份。如果需要这样做,则需要将消息直接写入mail.box文件,而不是使用NotesDocument.Send()方法。在Knut的答案中,有一个链接到Karl-Henry Martinsson的剧本。
请注意,在询问之前在这里搜索会是一个好主意。