Home > Domino Tips > Developer > LotusScript > Beware of attachments when writing docs to mail.box in R6
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

LOTUSSCRIPT

Beware of attachments when writing docs to mail.box in R6


Marie Turner
01.20.2005
Rating: -3.89- (out of 5)


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


View member feedback to this tip.

Picture this scenario: You have a workflow application involving e-mail notifications out to users where the notifications come "from" the application itself. It worked perfectly in R5. But when you place it on an R6 server, it begins to error with a "You are not authorized" message. You're stumped! Nothing has changed ACL-wise! But the application is now unusable and your users are hopping mad.

Before this happens to you, you might want to review your code for the following.

We all know that in the good ole days of R5, everyone coded to send mail by creating and saving documents directly in the mail.box rather than using the doc.Send method. Using this scenario, you could ensure that the router would then send your doc with whatever "From" information you saved the doc with, rather than worrying about what ID actually created the document.

However, you should listen when Lotus tells you not to do this in R6, especially if your code uses the doc.embedobject() method and the object it's embedding happens to be an attachment of any length. Because in this instance, if the ID executing the code has only depositor access to the mail.box (as most do) and the mail.box has LZ1 compression turned on (as is default in R6), your code will generate a "You are not authorized to perform that operation." It's an odd bug in R6, and it is documented in the Technote The LotusScript "EmbedObject" Method Results in the Error: "You are not Authorized to Perform that Operation", and in my testing it didn't even crop up on every R6 server, so it's best to take it out of your code ahead of time.

The best way to code around this, of course, is to create your documents in the database you're sending from or another database where the sending ID has editor access. If you need to control who the mail appears to be from, use the Principal field. To control where mail gets replied, use the ReplyTo field.

Of course, the sending ID will still be visible to the receiving party on the memo letterhead as "Sent by." But that makes the corporate auditors happier anyway, and your code will hopefully be more stable in the long term.

MEMBER FEEDBACK TO THIS TIP

Wouldn't the best option be to disable LZ1 compression like the technote says? That would seem to be an easier solution than having to possibly change a ton of applications.

—Steve H.

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

This tip was submitted to the SearchDomino.com tip exchange by member Marie Britton Turner. 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.


Submit a Tip




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


RELATED CONTENT
LotusScript
Programmatically replace the design of Lotus Notes databases
Reading a binary field in an Oracle database with LotusScript
LotusScript equivalent of @Picklist for Lotus Notes
Launch large attachments within an email from a Notes database
How to find files on a hard drive or mapped network with LotusScript
Update the ACL from the Roles view with LotusScript
LotusScript agent moves tagged spam email to junk mail folder
Create a personalized greeting for Lotus Notes database users
Fail-safe rich-text validation using LotusScript
How to export Lotus Notes views to a Microsoft Excel database

Lotus Notes 5
Track and record Lotus Notes user logins to Domino Server
How to fix the size limitation on Lotus Notes summary text fields
How to correct Lotus Notes public key mismatches in four easy steps
Moving a remote user mail database to new Lotus Domino server
OpenNTF OpenLog
Calendar delegation problem with Lotus Notes client 6.5.5 upgrade
Advice sought re lack of Notes/Outlook interoperability
Availability of R6 update exam
After Notes upgrade, LotusScript mail function doesn't work
Notes and Domino R5 exams to be retired

Lotus Notes 6
A guided tour of the Lotus Notes Domino blogosphere
How to fix the size limitation on Lotus Notes summary text fields
How to correct Lotus Notes public key mismatches in four easy steps
Cracked users' HTTP passwords still a threat on many Lotus Notes R6 and R7 domains
OpenNTF Mail Experience
OpenNTF OpenLog
Top 10 Notes/Domino administration tips of 2006
Creating a Lotus Notes view column categorized by month
A project-tracking application for Lotus Notes Domino
Putting a stop to incoming spam on Lotus Notes 6.5

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

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.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




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