< Back

Document Subject: 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://#MailMessageSize or http://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....