Home > Domino Tips > Developer > Agent > Forwarding email messages to other account
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

AGENT

Forwarding email messages to other account


Wade Gilliland
04.05.2005
Rating: -3.47- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


VIEW MEMBER FEEDACK TO THIS TIP

There are times when employees need to forward company e-mails to a home/other account. The standard Notes "Send Mail Message" with "Include copy of document" does not make it easy to determine the original sender and subject. This bit of code lets you "forward" to another e-mail account while retaining the original Subject and From fields. The agent can be set to run Before New Mail Arrives.

MEMBER FEEDBACK TO THIS TIP

This is a nice tip and a nice idea. However, on my site (Notes 5.09a) it works only properly for Notes-Mail.
For SMTP-mail I get the message "Notes Error: Encryption key not found (mail database is not encrypted on the server)."
On the server console I get the message "> 25.05.2005 10:27:00 AMgr: Agent ('Mail2Home' in 'mail\kossi.nsf') Fehlermeldung (Error Message): Object variable not set"
Any ideas?
—Michael K.

******************************************

The Rules feature of Notes can also be customized to forward e-mails to another account [particularly useful for those without Designer access], as follows:

Go to Tools, Mail Rules and choose New Rule.

Under Specify Conditions, create Condition When: Sender does not contain!.

Click Add to put condition into the window When mail messages arrive that meet these conditions:

Under Specify Actions, specify "send copy to" "full," with user's forwarding address in the To: field.

Click "Add Action" to put 'send full copy to [username@domain.dom]' action into 'Perform the following actions:' window.

Click OK.

Enable or Disable the rule as needed by choosing the appropriate button.


—Mira B.

******************************************

This tip did not work in our setup (Domino 5.0.13, clients in 5.0.11), so I altered it and it works like a charm for us. I added to the doc.pr


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Agent
Run or restart Notes/Domino agents via text messages
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
How to export data from a Lotus Notes database to a CSV file
Enable or disable scheduled agents without opening the Lotus Notes database design
Creating custom views in Lotus Notes databases
Editing fields in a Lotus Notes view with Ajax

Lotus Notes Domino Agents
Run or restart Notes/Domino agents via text messages
Calculating results for a column in a Lotus Notes view
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Top 10 Lotus Notes/Domino coding and development tips of 2008
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
Top 10 Lotus Notes Domino programming and development tips of 2007
How to export data from a Lotus Notes database to a CSV file

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


incipal, doc.inetfrom and doc.replyto fields. Here's the code:


—Robert B.

******************************************

I have encountered problems with using a forwarding agent and before mail arrives execution. If there is a high volume of mail it only processes 70% of the mails. I would suggest having it run as a scheduled agent and set a processed flag on the document to know what has been processed. I have had much better luck with this method.
—Pablo H.

******************************************

I suspected this was probably the solution you'd come up with, based on the abstract. A minor suggestion, however, having implemented virtually the same code myself.

Somewhere after the CopyAllItems you want to remove whatever may have been in the incoming CopyTo field. Otherwise, if you were copied on the original message, you will send a new copy to yourself (and any others copied), and the cycle will continue....


—John D.

******************************************

I can't get this to work with mail coming in from outside e-mail addresses. My Domino server reports, "Notes Error: The cryptographic key was not found." Does it only work for incoming Domino mail?
—Jeffery H.

******************************************

The short, quick answer is that it works for us on all e-mail. Whether it comes from another Domino user, Hotmail, Yahoo, etc., it doesn't make any difference in our shop.

The message regarding "cryptographic key" sounds like you have an option in your mail formatting that is different from what we're doing here. I've never encountered any error or warning message involving cryptographic keys. This option worked for us in R5 and R6. I'd be curious to know what you're using.

The next thing I'd check would be whether or not the e-mails were encrypted, or if your company encrypts incoming e-mails. We don't encrypt e-mails as a rule in our shop, so I've never tested the performance using encrypted e-mails.
—Wade Gilliland, tip author

******************************************

Changing the line code

to

should cure the "Notes Error: The cryptographic key was not found." problem.

Moreover the document needs to be saved before sending otherwise the recipients specified in the SendTo item are not picked up. Something like:-

Or even better the recipients can be specified directly in:-
—Stefano D.

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip exchange by member Wade Gilliland. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts