2017-11-23 3 views
0

노트 ID :연꽃 스크립트를 자동화하여 이메일 보내기 에이전트 (가 그 수를 보낸 사람이 아닌 에이전트 서명자 변경)

PCSAdmin LSBSAdmin을

질문 : I 자동화의 에이전트가 메일을 보냅니다. 상담원에게 서명 한 사람이 아닌 다른 사람이 발신자를 수정할 수 있습니까?

케이스 :

  1. 현재 에이전트 [PCSAdmin 의해 서명된다. 그래서 항상 "PCSAdmin"이라는 사람이 을 보내 게됩니다
  2. 다른 계정으로 변경하고 싶습니다 [LSBSAdmin] 전자 메일을 보내려면 보낸 사람의 스크립트를 편집 할 수 있습니까? [LSBSAdmin]으로 에이전트에 서명해야합니까?

로터스 스크립트

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 

답변

2

내 대답 to this earlier questionthis question, too, 그리고 Knut's answer to yet another question를 참조하십시오.

IBM이 지원하는 가장 좋은 방법은 Principal 필드를 사용하는 것이지만 보낸 사람 ID를 완전히 숨기지는 않습니다. 이를 수행해야하는 경우 NotesDocument.Send() 메소드를 사용하는 대신 mail.box 파일에 직접 메시지를 작성해야합니다. Knut의 대답에 대한 Karl-Henry Martinsson의 대본에 대한 링크가 있습니다.

질문하기 전에 여기를 검색하는 것이 좋습니다.

+0

이 답변도 참조하십시오. https://stackoverflow.com/a/47392188/785061 –

+0

나는 그것을 시험해 봅니다. 그러나 krut의 anwser를 기반으로하는 약간의 질문이있어, 그것은 우편물을 저장해야 할 것입니다. 박스, 그것을하는 일반적인 방법입니까? –

+0

네, 꽤 흔합니다. 나는 많은 사람들이 아마도 Knut의 답변에서 링크 된 Karl-Henry의 수업을 사용한다고 생각하지만, 어떤 경우에는 그가하는 것처럼 메일 서버 이름을 결정하지 않을 것입니다. 그것은 서버에서 실행되는 에이전트에서 항상 실행되는 코드에 적합한 방법입니다. 그래야 당신에게 좋을 것입니다. –