Stop message with size > 10 Mo don't work after cancel and send only - help developper need

Hi !

I need some help about the possibility to stop mail with attachment > 10 Mo.

I make this code (with help i’m not developper) and put it in the mask “MEMO”.

I used it to informe my users before sending mail and recept a report error by the router.

The router refused mail > 10 Mo too.

It works fine but one guy find a tips to send it.

After he makes a mail with attachment (32 Mo), he canceled this mail.

The dialog box appears and propose to save/send, send only, cancel…

If he select send only, the mail is sending.

Can you help me to refuse this mail in this case

thank

regards.

For information, this is the code i put in MEMO

Sub Querysave(Source As Notesuidocument, Continue As Variant)

Dim sizemaxi As Long

Dim reponse As Integer

Dim lib_objet As String



sizemaxi = 10485760

' ===================================================================== 

'Script forçcant un objet dans le message

If source.Document.subject(0) = "" Then 

	'If Messagebox ( "Attention, votre message ne comporte pas de sujet, la réponse est susceptible d'étre interceptée, continuer ?" , 36 , "Sujet du message") <> 6 Then 

	Messagebox "Veuillez saisir un objet, merci.", 0 + 48, " Objet du message vide !"

	continue = False 

	'End If 

End If 

' ===================================================================== 

' ===================================================================== 

'Script forçant la taille maxi à 10 Mo	

If source.Document.Size > sizemaxi Then

	Messagebox "Vous ne pouvez pas envoyer de document dont la taille est supérieure à 10 Mo"

	continue = False

Else

' ===================================================================== 

	Call source.FieldSetText("useApplet", "True")

	Call cMemoObject.QuerySave(Continue)

End If

End Sub

Subject: stop message with size > 10 Mo don’t work after cancel and send only - help developper need

This may not be what you are looking for, but in the Messaging Configuration Document, Router/SMTP, Restrictions and Controls, Restrictions, you set the maximum message size by entering a value in the field “Maximum Message Size.” Restart the Router, and it will bounce back all messages over whatever size you set.

HTH.

Gregg

Subject: Does the original post actually say that the max message size is already enabled?

That’s the way I’m reading it. But regardless, this is an admin question, and I don’t see how it has anything to do with your code, which, once again, appears to me to be a warning that explains the delivery failure that comes next as a result of the maximum message size restriction. If it is in place, then sending without saving cannot work, so I’m confused.

If your question is why your QuerySave code doesn’t run when the user doesn’t save, then all I can say is move it to QueryClose and use a uidoc.editmode test.

Subject: stop message with size > 10 Mo don’t work after cancel and send only - help developper need

I remember back in the R5 days we often wished for a QuerySend event to handle situations just like this.