Deprecated: Creation of dynamic property Kirki\Field\Repeater::$compiler is deprecated in /home1/diywmcom/public_html/baifaqimei/wp-content/themes/blogstream/functions/kirki/kirki-packages/compatibility/src/Field.php on line 305

Warning: Cannot modify header information - headers already sent by (output started at /home1/diywmcom/public_html/baifaqimei/wp-content/themes/blogstream/functions/kirki/kirki-packages/compatibility/src/Field.php:305) in /home1/diywmcom/public_html/baifaqimei/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/diywmcom/public_html/baifaqimei/wp-content/themes/blogstream/functions/kirki/kirki-packages/compatibility/src/Field.php:305) in /home1/diywmcom/public_html/baifaqimei/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/diywmcom/public_html/baifaqimei/wp-content/themes/blogstream/functions/kirki/kirki-packages/compatibility/src/Field.php:305) in /home1/diywmcom/public_html/baifaqimei/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/diywmcom/public_html/baifaqimei/wp-content/themes/blogstream/functions/kirki/kirki-packages/compatibility/src/Field.php:305) in /home1/diywmcom/public_html/baifaqimei/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/diywmcom/public_html/baifaqimei/wp-content/themes/blogstream/functions/kirki/kirki-packages/compatibility/src/Field.php:305) in /home1/diywmcom/public_html/baifaqimei/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/diywmcom/public_html/baifaqimei/wp-content/themes/blogstream/functions/kirki/kirki-packages/compatibility/src/Field.php:305) in /home1/diywmcom/public_html/baifaqimei/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/diywmcom/public_html/baifaqimei/wp-content/themes/blogstream/functions/kirki/kirki-packages/compatibility/src/Field.php:305) in /home1/diywmcom/public_html/baifaqimei/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home1/diywmcom/public_html/baifaqimei/wp-content/themes/blogstream/functions/kirki/kirki-packages/compatibility/src/Field.php:305) in /home1/diywmcom/public_html/baifaqimei/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":575,"date":"2011-03-11T11:56:49","date_gmt":"2011-03-11T03:56:49","guid":{"rendered":"http:\/\/loveshow.us\/?p=575"},"modified":"2011-04-08T12:23:20","modified_gmt":"2011-04-08T04:23:20","slug":"agent-forwarding-messages-using-lotus","status":"publish","type":"post","link":"https:\/\/loveshow.us\/?p=575","title":{"rendered":"\u4f7f\u7528Agent\u8f6c\u53d1Lotus\u90ae\u4ef6"},"content":{"rendered":"

\u7ecf\u53d1\u73b0\uff0c\u76f4\u63a5\u590d\u5236\u7c98\u8d34\u672c\u6587\u5185\u5bb9\u8fc7\u53bb\uff0c\u5bfc\u81f4\u53cc\u5f15\u53f7\u548c\u5355\u5f15\u53f7\u6709\u95ee\u9898\uff0c\u56e0\u6b64\u4f1a\u6709\u4ee3\u7801\u51fa\u9519\uff0c\u5efa\u8bae\u7c98\u8d34\u8fc7\u53bb\u524d\uff0c\u5148\u5c06”\u548c’\u68c0\u67e5\u4e0b\uff0c\u5c06lotus\u91cc\u7c98\u8d34\u8fc7\u6765\u7684\u6240\u6709\u53cc\u5f15\u53f7\u548c\u5355\u5f15\u53f7\u7528”\u548c’\u66ff\u6362\u4e00\u904d\u5373\u53ef\u3002\u5426\u5219\u4f1a\u6709\u7ea2\u8272\u5b57\u63d0\u793a\u4ee3\u7801\u51fa\u9519\u3002<\/span><\/p>\n

\u6211\u5728\u6587\u672b\u4e5f\u9644\u4e0atxt\u6863\u7684\u6587\u672c\uff0c\u91cc\u9762\u7684\u53cc\u5f15\u53f7\u548c\u5355\u5f15\u53f7\u662f\u5bf9\u7684\u3002\u53ef\u4ee5\u7c98\u8d34txt\u6587\u6863\u91cc\u7684\u4ee3\u7801\uff0c\u70b9\u6b64\u4e0b\u8f7d<\/a><\/strong>1.<\/a><\/strong>\u3002<\/strong><\/p>\n

1.<\/p>\n

\u9996\u5148\uff0c\u65b0\u5efa\u4e00\u4e2aAgent\uff0c\u5176Runtime\u8fd9\u91cc\u7684\u5c5e\u6027\u9009\u62e9\u4e3aon event\uff0cafter new mail has arrived\u3002\u5982\u4e0b\u56fe\u3002<\/div>\n

\"\"<\/a><\/p>\n

2.<\/p>\n

Declarations\u91cc\uff0c\u5b9a\u4e49\u5982\u4e0b\u53d8\u91cf\uff0c<\/p>\n

TargetEmail\u6539\u6210\u4f60\u81ea\u5df1\u9700\u8981\u8f6c\u53d1\u7684Email<\/p>\n

Const TargetEmail = “XXX@xxx.com”
\nDim db As notesdatabase
\nDim session As NotesSession<\/p><\/blockquote>\n

\"\"<\/a><\/div>\n
3.<\/div>\n
\u5728Initialize\u90a3\u91cc\uff0c\u8f93\u5165\u5982\u4e0b\u7684\u4ee3\u7801\uff1a<\/div>\n
\n
\n
Sub Initialize<\/div>\n
Dim doc As NotesDocument<\/div>\n
Dim ReturnVal As Boolean<\/div>\n
Dim PojistkaMax As Integer<\/div>\n
Dim collection As NotesDocumentCollection<\/div>\n
Dim Addeditem As NotesItem<\/div>\n
Dim CurAgent As NotesAgent<\/div>\n
Dim docStatus As Variant<\/div>\n
Dim docProcessed As Boolean<\/div>\n
Set session = New NotesSession<\/div>\n
Set db = session.CurrentDatabase<\/div>\n
Set CurAgent = session.CurrentAgent<\/div>\n
PojistkaMax = 0<\/div>\n
Set collection = db.UnprocessedDocuments<\/div>\n
Set doc = collection.GetFirstDocument()<\/div>\n
While Not(doc Is Nothing Or PojistkaMax>20)<\/div>\n
docStatus=””<\/div>\n
docProcessed = False<\/div>\n
If (Doc.HasItem(CurAgent.Name & “_done”)) Then<\/div>\n
docStatus = Doc.GetItemValue(CurAgent.Name & “_done”)<\/div>\n
If (Cstr(docStatus(0))=”1″) Then docProcessed=True<\/div>\n
End If<\/div>\n
If (docProcessed=False) Then<\/div>\n
Call ProcessEmail (doc)<\/div>\n
If (Doc.HasItem(CurAgent.Name & “_done”)) Then<\/div>\n
Call doc.ReplaceItemValue(CurAgent.Name & “_done”,”1″)<\/div>\n
Call doc.Save( True, False, False )<\/div>\n
Else<\/div>\n
Set Addeditem = doc.AppendItemValue ( CurAgent.Name & “_done”, “1” )<\/div>\n
Call doc.Save( True, False, False )<\/div>\n
End If<\/div>\n
End If<\/div>\n
Call session.UpdateProcessedDoc(doc)<\/div>\n
Set doc = collection.GetNextDocument(doc)<\/div>\n
PojistkaMax = PojistkaMax + 1<\/div>\n
Wend<\/div>\n
End Sub<\/div>\n
Sub ProcessEmail (Mydoc As NotesDocument)<\/div>\n
Dim rtnav As NotesRichTextNavigator<\/div>\n
Dim MyMssgHeader As String<\/div>\n
Dim rtitem As NotesRichTextItem<\/div>\n
Dim Maildoc As NotesDocument<\/div>\n
Dim senderdomain As String<\/div>\n
Dim b As Integer<\/div>\n
Dim FromItem As NotesItem<\/div>\n
Dim FromName As String<\/div>\n
Dim FromEmail As String<\/div>\n
Dim FromIDENT As String<\/div>\n
Dim FromOrig As String<\/div>\n
Dim ItemValue As Variant<\/div>\n
Dim m_strForm As String<\/div>\n
On Error Goto GenError<\/div>\n
If (MyDoc.IsEncrypted) Then Exit Sub<\/div>\n
If (myDoc.HasItem(“$KeepPrivate”)) Then<\/div>\n
ItemValue = MyDoc.GetItemValue(“$KeepPrivate”)<\/div>\n
If (Cstr(ItemValue(0))=”1″) Then Exit Sub<\/div>\n
End If<\/div>\n
If (Not myDoc.HasItem(“From”)) Then Exit Sub<\/div>\n
Set Maildoc = New NotesDocument(db)<\/div>\n
Call Mydoc.CopyAllItems( Maildoc, True )<\/div>\n
‘ \u00a0 \u00a0 \u00a0 \u00a0If (Maildoc.HasEmbedded ) Then<\/div>\n
Set rtitem = Maildoc.GetFirstItem(“Body”)<\/div>\n
‘ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0If ( rtitem.Type = RICHTEXT) Then<\/div>\n
‘ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 If (Not (Isempty(rtitem.EmbeddedObjects))) Then<\/div>\n
‘ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Forall o In rtitem.EmbeddedObjects<\/div>\n
‘ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0If ( o.Type = EMBED_ATTACHMENT ) Then<\/div>\n
‘ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Call o.Remove<\/div>\n
‘ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0End If<\/div>\n
‘ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0End Forall<\/div>\n
‘ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 End If<\/div>\n
‘ \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0End If<\/div>\n
‘ \u00a0 \u00a0 \u00a0 \u00a0End If<\/div>\n
FromIDENT=””<\/div>\n
FromEmail=””<\/div>\n
FromName=””<\/div>\n
FromOrig=””<\/div>\n
If (MailDoc.HasItem(“Principal”)) Then<\/div>\n
FromOrig=MailDoc.Principal(0)<\/div>\n
Else<\/div>\n
FromOrig=MailDoc.From(0)<\/div>\n
End If<\/div>\n
If (Instr(1,FromOrig,”CN=”)>0 And Instr(1,FromOrig,”OU=”)>0) Then<\/div>\n
FromIDENT=FromOrig<\/div>\n
Else<\/div>\n
Call ParseAddr (FromOrig,FromName, FromEmail)<\/div>\n
End If<\/div>\n
‘ add by James<\/div>\n
If \u00a0FromOrig =”Mail Router” Then<\/div>\n
Exit Sub<\/div>\n
End If<\/div>\n
If \u00a0FromOrig =”gcsecpoccoord” Then<\/div>\n
Exit Sub<\/div>\n
End If<\/div>\n
If \u00a0FromOrig =”LotusQuickr@USSECAVPQUCK02.na.ey.net” Then<\/div>\n
Exit Sub<\/div>\n
End If<\/div>\n
m_strForm = MailDoc.GetItemValue ( “Form”)(0)<\/div>\n
If (Strcompare(m_strForm, “Delivery Report”) = 0) Then<\/div>\n
Exit Sub<\/div>\n
End If<\/div>\n
If (Strcompare(m_strForm, “NonDelivery Report”) = 0) Then<\/div>\n
Exit Sub<\/div>\n
End If<\/div>\n
If (Strcompare(m_strForm, “Trace Report”) = 0 ) Then<\/div>\n
Exit Sub<\/div>\n
End If<\/div>\n
If (Strcompare(m_strForm, “Return Receipt”)= 0) Then<\/div>\n
Exit Sub<\/div>\n
End If<\/div>\n
‘ end by James<\/div>\n
If (FromIDENT<>””) Then<\/div>\n
MailDoc.Principal = FromIDENT<\/div>\n
Else<\/div>\n
If (FromEmail=””) Then<\/div>\n
MailDoc.Principal = FromOrig<\/div>\n
Else<\/div>\n
MailDoc.Principal = FromName & ” <” & FromEmail & “@NotesDomain” & “>”<\/div>\n
MailDoc.INetFrom = FromName & ” <” & FromEmail & “>”<\/div>\n
End If<\/div>\n
End If<\/div>\n
If (Mydoc.HasItem(“ReplyTo”)) Then<\/div>\n
Maildoc.ReplyTo = Mydoc.ReplyTo(0)<\/div>\n
End If<\/div>\n
rtitem.AddNewline(2) ‘ add 2 new lines at the end of Body<\/div>\n
rtitem.AppendText(“In the Sent field was: “) ‘ add this text at the end of body, you can modify this part to add this only if in From field is allready something<\/div>\n
For b=0 To Ubound(Maildoc.SendTo)<\/div>\n
rtitem.AppendText(Maildoc.SendTo(b) + “, “) \u00a0 ‘add all elements from From field<\/div>\n
Next<\/div>\n
rtitem.AddNewline(2) ‘ add 2 new lines at the end of Body<\/div>\n
rtitem.AppendText(“In the CC field was: “) ‘ add this text at the end of body, you can modify this part to add this only if in CC field is allready something<\/div>\n
For b=0 To Ubound(Maildoc.CopyTo)<\/div>\n
rtitem.AppendText(Maildoc.CopyTo(b) + “, “) \u00a0 ‘add all elements from CC field<\/div>\n
Next<\/div>\n
rtitem.AddNewline(2) ‘ add 2 new lines at the end of Body<\/div>\n
rtitem.AppendText(“In the BCC field was: “) ‘ add this text at the end of body, you can modify this part to add this only if in CC field is allready something<\/div>\n
For b=0 To Ubound(Maildoc.BlindCopyTo)<\/div>\n
rtitem.AppendText(Maildoc.BlindCopyTo(b) + “, “) \u00a0 ‘add all elements from CC field<\/div>\n
Next<\/div>\n
If (Maildoc.HasItem(“CopyTo”)) Then<\/div>\n
Maildoc.CopyTo = “”<\/div>\n
End If<\/div>\n
If (Maildoc.HasItem(“BlindCopyTo”)) Then<\/div>\n
Maildoc.BlindCopyTo = “”<\/div>\n
End If<\/div>\n
Maildoc.SendTo = TargetEmail<\/div>\n
Call Maildoc.Send(False)<\/div>\n
Set Maildoc = Nothing<\/div>\n
Exit Sub<\/div>\n
GenError:<\/div>\n
Set Maildoc=Nothing<\/div>\n
Set Maildoc = New NotesDocument(db)<\/div>\n
With Maildoc<\/div>\n
.Subject=”An error occured while parsing”<\/div>\n
.SendTo = TargetEmail<\/div>\n
.Body=”An error occured while parsing message ” \u00a0 \u00a0 \u00a0 \u00a0 & Mydoc.Subject(0) & “, from: ” & Mydoc.From(0) & “….Err msg: ” & Error$<\/div>\n
Call .Send(False)<\/div>\n
End With<\/div>\n
Set Maildoc=Nothing<\/div>\n
Exit Sub<\/div>\n
End Sub<\/div>\n
\n
Sub ParseAddr (ParseWhat As String, Part1 As String,Part2 As String)<\/div>\n
<\/span>Dim i As Integer<\/div>\n
<\/span>Dim i2 As Integer<\/div>\n
<\/span><\/div>\n
<\/span>i=Instr(1,ParseWhat,”<“)<\/div>\n
<\/span>i2=Instr(i,ParseWhat,”>”)<\/div>\n
<\/span><\/div>\n
<\/span>If (i>=i2) Then<\/div>\n
<\/span>Exit Sub<\/div>\n
<\/span>End If<\/div>\n
<\/span><\/div>\n
<\/span>If (i=0) Then i=0<\/div>\n
<\/span>If (i2=0) Then i2=Len(ParseWhat)+1<\/div>\n
<\/span><\/div>\n
<\/span>If (i>=3) Then<\/div>\n
<\/span>Part1=Mid(ParseWhat,1,i-2)<\/div>\n
<\/span>End If<\/div>\n
<\/span>Part2=Mid(ParseWhat,i+1,i2-i-1)<\/div>\n
<\/span><\/div>\n
<\/span>If (Instr(1,Part2,”@”)=0) Then<\/div>\n
<\/span>Part2=””<\/div>\n
<\/span>End If<\/div>\n
<\/span><\/div>\n
End Sub<\/div>\n<\/div>\n<\/blockquote>\n
\u4e4b\u540e\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u5e2e\u4f60\u5206\u5272\u6210\u5982\u4e0b\u7684\u56fe\uff1a<\/div>\n
\"\"<\/a><\/div>\n
\"\"<\/a><\/div>\n
\"\"<\/a><\/div>\n
4.<\/div>\n
\u786e\u8ba4Terminate\u90a3\u8fb9\u6709\u5982\u4e0b\u7684\u8bed\u53e5\uff1a<\/div>\n
\n
\n
Sub Terminate<\/div>\n
End Sub<\/div>\n<\/blockquote>\n<\/div>\n
\"\"<\/a><\/div>\n<\/div>\n
\u4ee5\u4e0a\u662f\u901a\u8fc7Agent\u8f6c\u53d1\u90ae\u4ef6\u7684\u4e00\u4e2a\u65b9\u6cd5\uff0c\u5df2\u7ecf\u8003\u8651\u5230\u4e86\u5927\u90e8\u5206\u7684\u6b7b\u5faa\u73af\u95ee\u9898\uff0c\u4f46\u4e0d\u4fdd\u8bc1100%\u4e0d\u4f1a\u53d1\u751f\u3002\u672c\u4eba\u7f16\u7a0b\u6c34\u5e73\u6709\u9650\u3002<\/strong><\/span><\/div>\n
\u4ee5\u4e0a\u8d44\u6599\u4f9b\u5404\u4f4d\u5b66\u4e60\u7f16\u7a0b\u77e5\u8bc6\u4f7f\u7528\uff0c\u8bf7\u6839\u636e\u516c\u53f8\u90ae\u4ef6\u8981\u6c42\/\u89c4\u5219\u9002\u5f53\u4f7f\u7528\uff0c\u672c\u4eba\u4e0d\u5bf9\u4f7f\u7528\u4e0a\u8ff0\u4ee3\u7801\u6240\u9020\u6210\u7684\u635f\u5931\u8d1f\u8d23\u3002<\/strong><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"

\u7ecf\u53d1\u73b0\uff0c\u76f4\u63a5\u590d\u5236\u7c98\u8d34\u672c\u6587\u5185\u5bb9\u8fc7\u53bb\uff0c\u5bfc\u81f4\u53cc\u5f15\u53f7\u548c\u5355\u5f15\u53f7...<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[22,21],"_links":{"self":[{"href":"https:\/\/loveshow.us\/index.php?rest_route=\/wp\/v2\/posts\/575"}],"collection":[{"href":"https:\/\/loveshow.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/loveshow.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/loveshow.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/loveshow.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=575"}],"version-history":[{"count":7,"href":"https:\/\/loveshow.us\/index.php?rest_route=\/wp\/v2\/posts\/575\/revisions"}],"predecessor-version":[{"id":606,"href":"https:\/\/loveshow.us\/index.php?rest_route=\/wp\/v2\/posts\/575\/revisions\/606"}],"wp:attachment":[{"href":"https:\/\/loveshow.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/loveshow.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/loveshow.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}