BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/index.php)
-   General BlackBerry Discussion (http://www.blackberryforums.com/forumdisplay.php?f=10)
-   -   Lotus Notes solution for BIS users (http://www.blackberryforums.com/showthread.php?t=28239)

tacoyac 03-09-2006 10:51 PM

Lotus Notes solution for BIS users
 
Due to issues we'd been having with the mail connector and the problems with receiving some email via iNotes while using the BB Internet Service, we decided to create an "agent" on the Notes server using the Domino Designer which forwards all mail to our BB addresses while retaining the original "From" in the message (so that you can reply to the sender easily, something not possible with regular Notes rules). What's great is that mail comes instantaneously - no need to wait for the 15 minute mail connector cycle.
In any event, we're excited about it.
If anyone wants, I can publish the code here for you.

d_fisher 03-09-2006 11:05 PM

Please do, I am sure someone will want it sooner or later.

whsbuss 03-10-2006 07:15 AM

I use a rule for each person that sends to my Lotus account (only the boss and spouse). I have it set to do a full copy to my 7130 when the rules applies. The From address on the email I receive on the BB is the original and I never have a problem replying right from the BB. We're running Notes 6.5.4

BOHIC 03-10-2006 10:23 AM

This isn't my work. I got it from somebody that got it from somebody. But anyhow, it does the trick.:

Can you forward a copy of a user's mail and keep it in their mailbox?

You can use R6 Mail Rules in their mailbox, but the problem is that all the forwarded mail looks like it comes from you.

As an alternative, you can use this Before New Mail Arrives agent. However, it cannot include the Cc list directly; it has to be part of the mail message so a duplicate copy of the forwarded mail doesn't get sent to the original Cc list. This nice thing about this agent is that it retains the original "From" address so the user can reply to the sender directly.

Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim forward As NotesDocument
Dim forwardaddress As String
Dim rtitem As NotesRichTextItem
Dim rtnav As NotesRichTextNavigator

' **** set to the address that you would like to forward mail to ****
forwardaddress = "test@test.com"

Set db = s.currentdatabase
Set doc = s.DocumentContext

Set forward = New NotesDocument(db)
Call doc.CopyAllItems(forward, True)
Set rtitem = forward.GetFirstItem( "Body" )
Dim newtext As String

'navigation element in order to place header in front of body text
Set rtnav = rtitem.CreateNavigator
Call rtnav.FindFirstElement(RTELEM_TYPE_TEXTPARAGRAPH)

'determines if this is an internal message or not
Dim nn As New NotesName(doc.GetItemValue("From")(0))
Dim cc As New NotesName(doc.GetItemValue("CopyTo")(0))
Dim sto As New NotesName(doc.GetItemValue("SendTo")(0))

' Set up a header that will be attached to the email which
' specifies additional info about the original email since we include the Cc list directly
Dim testcopy As String
If doc.GetItemValue("CopyTo")(0) = "" Then
testcopy = "no one."
Else

Forall x In doc.GetItemValue("CopyTo")
If testcopy = Null Then
testcopy = x
Else
testcopy = testcopy + x + ", "
End If

End Forall

End If


If nn.IsHierarchical Then 'if it is then get their internet address
If nn.Addr821 <> Null Then
'if they have one then use this as the from address
Call rtitem.BeginInsert(rtnav)
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText( "Original message sent to " + sto.Addr821 + " and copies were sent to " + testcopy)
Call rtitem.AddNewLine( 3 )
Call rtitem.EndInsert

Call forward.RemoveItem("CopyTo")
Call forward.RemoveItem("BlindCopyTo")
Call forward.ReplaceItemValue("From", nn.Addr821)
Call forward.Save( True, True )

Else
' otherwise if this is an internal message and the internet address of
' that user is not populated, use the agent signer's return address
Call rtitem.BeginInsert(rtnav)
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText( "Original message sent to " + sto.Addr821 + " and copies were sent to " + testcopy)
Call rtitem.AddNewLine( 3 )
Call rtitem.EndInsert

Call forward.RemoveItem("CopyTo")
Call forward.RemoveItem("BlindCopyTo")
Call forward.ReplaceItemValue("iNetFrom", nn.Addr821)
Call forward.Save( True, True )
End If
Else
'otherwise this came in from the internet, so just use the from address as the inetfrom
Call rtitem.BeginInsert(rtnav)
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText( "Original message sent to " + doc.GetItemValue("SendTo")(0) + " and copies were sent to " + testcopy)
Call rtitem.AddNewLine( 3 )
Call rtitem.EndInsert

Call forward.RemoveItem("CopyTo")
Call forward.RemoveItem("BlindCopyTo")
Call forward.ReplaceItemValue("iNetFrom", doc.GetItemValue("From")(0))
Call forward.Save( True, True )
End If
forward.Send False, forwardaddress
Call forward.RemovePermanently(True)
End Sub

tacoyac 03-10-2006 10:52 AM

code
 
this is what we used:

Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim mail As NotesDocument
Dim user As NotesName
Dim sName As String

Set db = session.CurrentDatabase
Set mail = db.CreateDocument
Set doc = session.DocumentContext
Set user = session.CreateName(doc.From(0))

Call doc.CopyAllItems(mail, True)

mail.Form = "Memo"
mail.SendTo = "email-address@mycingular.blackberry.net"
mail.CopyTo = ""
mail.BlindCopyTo = ""

If doc.INetFrom(0) = "" Then
mail.INetFrom = doc.From
Else
mail.INetFrom = doc.INetFrom
End If

Call mail.Send(True, False)

Call session.UpdateProcessedDoc(doc)
End Sub

Stinsonddog 03-10-2006 11:19 AM

So with this, you can have Lotus Notes without BES? Do you get any form of reconciliation or is it just push to the BB?

BOHIC 03-10-2006 12:42 PM

Quote:

Originally Posted by Stinsonddog
So with this, you can have Lotus Notes without BES? Do you get any form of reconciliation or is it just push to the BB?

That agent just forwards the mail you receive in Notes. No sort of reconciliation at all.

sparky_dfw_tx 03-10-2006 06:15 PM

Maybe I am missing something, but wouldn't the creation of a simple rule accomplish the same thing as the agent you are talking about?

Being a Lotus Notes user who is not on BES, I created a simple rule that forwards all incoming e-mails to my BIS address. When I view the e-mails via my BB, I have all of the From, To, CC, and BCC information (if I was BCCd). When I reply, I simply set my "Sent From" address to my Lotus address (it stays this way most of the time), as well as include my Lotus address as a BCC so I have a copy in my real inbox and no one is the wiser (I know the header will have my BIS address).

Is there an added benefit to the agent you are describing?

whsbuss 03-10-2006 07:25 PM

Quote:

Originally Posted by sparky_dfw_tx
Maybe I am missing something, but wouldn't the creation of a simple rule accomplish the same thing as the agent you are talking about?

Being a Lotus Notes user who is not on BES, I created a simple rule that forwards all incoming e-mails to my BIS address. When I view the e-mails via my BB, I have all of the From, To, CC, and BCC information (if I was BCCd). When I reply, I simply set my "Sent From" address to my Lotus address (it stays this way most of the time), as well as include my Lotus address as a BCC so I have a copy in my real inbox and no one is the wiser (I know the header will have my BIS address).

Is there an added benefit to the agent you are describing?

I stated that very point a few posts prior. I have a rule for my boss and my secretary to send any of their email to my BB. Simple and easy..... no need to reinvent the wheel.


All times are GMT -5. The time now is 11:11 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.