Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
Add Max Outgoing mail message size Warning to Mail Template

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#MailMessageSize or http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/MailMessageSize


Customer asked  me to add this. It's pretty easy. I thought it was already here.





 

Here's how you do the client:

Add this code to QuerySave before the line Call cMemoObject.QuerySave(continue)  call:

  '16 May 2007 Adam Foster  http://www.notesninjas.com/#MailMessageSize
Const mb = 1048576
Const maxsize = 10 * mb   '10 mb
If  source.Document.size > ( maxsize ) Then
Messagebox "Document size of " & Format$( source.document.Size / mb, "Fixed") & " Mb which is > " & maxsize/mb & " Mb. Try Zipping the attachments..."
    continue=False
End If

 

 Another variation allows documents to be saved as draft which is a bit more civilised.

  '16 May 2007 Adam Foster  http://www.notesninjas.com/#MailMessageSize

  Const mb = 1048576
Const maxsize = 10 * mb   '10 mb
If  source.Document.size > ( maxsize ) And source.document.actioninprogress(0) <> "4096" And source.document.actioninprogress(0) <> "" Then
Messagebox "Document has a size of " & Format$( source.document.Size / mb, "Fixed") & " Mb which is > " & maxsize/mb & " Mb. Try Zipping the attachments..."
continue=False
 Exit Sub ' this is optional really
End If

 

Prefer @function version, try putting this in Input Validation of Memo Form: ( A bit clunky in my mind )

@If(@IsDocBeingMailed |@IsDocBeingSaved & @DocLength > 10485760; @Failure("Msg > 10Mb so cannot be sent."); @Success)

NB: There is a server setting for this as well.

Web version probably coming soon....

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
Beginning Java Web Services by Andre Tost, Henry Andre Bequet, Meeraj Kunnumpurath, Sean Rhody
Web services are no longer a nascent technology in the programming industry; every major software vendor is rolling out web services-related APIs and products. Today Java developers are successfully adopting web services as the latest technology in application development in order to enable...
See at: Amazon.co.uk | Amazon.com |