Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I preserve the "From" and "Subject" info when using an agent to foward mail to an outside address?

Posted on 2003-11-14
6
Medium Priority
?
446 Views
Last Modified: 2013-12-18
I'd like to be able to forward a copy of all incoming email to an external email address AND preserve the "From" and "Subject" information. I have an agent working and it is successfully forwarding the email, but each mail item is from "me" with a blank "subject".
0
Comment
Question by:pezimadio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
6 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9753924
In order to accomplish that you have to set the "Forwarding address" field in your persons document of Domino Directory to your internet/Alt EMail address

~Hemanth
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9753937
If you run it using agent, the agent signer (Person who saved the agent) becomes the sender for any such forwarded mails. So there is not exactly a straight forward way to do it using agent. But for blank subject that can be avoided.. And it depends upon how you set the agent.. If it is using SImple actions, then click on More button next to subject field this will open another dialog where you can set text or formula.. For Subject field set formula to Subject.. THis is the name of the field that is being used in you mail to show subject.

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9754024
The above soln does have one handicap, that is when you set forwarding address in person doc.. the mail is no more stored in your lotus notes mail db, it is routed to your alt address. If you need to setup a copy in your notes db and as well forward it to alt email.. Check this soln out: http://searchdomino.techtarget.com/tip/1,289483,sid4_gci541500,00.html But this involves alteration of mail design.

Check out other alternate tips here
http://searchdomino.techtarget.com/tip/1,289483,sid4_gci814888,00.html

http://searchdomino.techtarget.com/tip/1,289483,sid4_gci756842,00.html

For some reason if you couldn't get to this web documents let me know I can paste the soln here.

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 2000 total points
ID: 9754052
I think the first link gives you what you need.

Just copy the script and paste it into your forwarding agent.

Agent is set to run before email arrives

Sub Initialize
    Dim s As New NotesSession
    Dim db As NotesDatabase
    Dim doc As NotesDocument
    Dim mdoc As NotesDocument
    Dim item As NotesItem
    Dim recipient As String
    Dim deletemail As String
    Dim pdoc As NotesDocument
    Dim agentLog As New NotesLog("Agent log")
    Call agentLog.OpenAgentLog
    Call agentLog.LogAction("SendMemo routine begin")
    Set db = s.CurrentDatabase
    Dim mailbox As New NotesDatabase("","")
    Call mailbox.Open(db.server,"mail1.box") ' Get handle to mail.box on the users current mail server
    Set doc = s.DocumentContext
    Set pdoc = db.GetProfileDocument("Calendar Profile")
    If Not pdoc Is Nothing Then
       recipient = pdoc.Forward_Address(0)
       'Check to see if they want the mail deleted from the server copy
       deletemail = pdoc.Delete_Mail(0)
       Call agentLog.LogAction("Recipient = " & recipient)
    Else
       End
    End If
    If Not doc Is Nothing Then
       'Make sure the doc is not a Delivery Failure
       If doc.form(0) <> "NonDelivery Report" Then
           Call agentLog.LogAction("doc found")
           Set mdoc = mailbox.CreateDocument
           mdoc.form = "Memo"
           mdoc.subject = doc.subject(0)
           If doc.from(0) <> "" Then
                 mdoc.from = doc.from(0)
                 mdoc.principal = doc.from(0)
                 mdoc.SendFrom = doc.from(0)
                 Call agentLog.LogAction("Sender = " & doc.from(0))           Else
                 mdoc.from = doc.principal(0)
                 mdoc.principal = doc.principal(0)
                 mdoc.SendFrom = doc.principal(0)
                 Call agentLog.LogAction("Sender = " & doc.principal(0))
          End If
          mdoc.PostedDate = Now()
          mdoc.ComposedDate = Now()
          mdoc.DeliveryDate = Now()
          mdoc.EncryptOnSend=False
          mdoc.sendto = recipient
          mdoc.Recipients = recipient           Set item = doc.GetFirstItem("Body")
          Call item.CopyItemToDocument( mdoc, "" )
          Call agentLog.LogAction("creating copy in mail1.box db")
          Call mdoc.Save(True,False) ' Save the document in the mail.box ( simulates a send)
          If deletemail = "Do not save a copy of mail in SLOC account" Then
                 Call doc.Remove(True)
           End If
       End If
    End If
    End
End Sub

0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9756991
Workin' hard baby!

Of course, there's one serious flaw in your code.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9758695
Not more than you... Staying up all night and doing EE Consultancy !!

Well that code is provided as is ! Let him check it out before jumping to conclusion.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question