Because spam mail senders sometimes send worms and viruses using a bogus user ID, it is increasingly important to distinguish authenticated user IDs from unauthenticated ones. To address this issue, Lotus Notes offers a digital signature for mail messages, which may be checked automatically by the receiver's mail client, assuming the receiver's mail client is a Lotus Notes client. However, this feature works only when users sign their mail messages. Setting the Notes mail option Always sign mails is not safe because this default is not always in effect (for instance, when resending an already sent mail message).
This tip describes a simple programmatic solution that prompts you before sending an unsigned mail message with an attachment as shown in the following screen:
Figure 1. Mail not signed yet prompt
NOTE: If you refresh your mail template, then you must repeat the following steps.
- Open your mail template in Domino Designer.
- Open the Memo form. Accept the warning that this change will be lost when the template is refreshed.
- In the programmer's pane, click the Send (Action) in the Object tab.
NOTE: If you cannot edit the Send (Action) in the programmer's pane, go to the Shared Code - Actions view to open the Send shared action instead. - In the programming window for the "Send (action): Click" formula, add the following code to the beginning of the formula:
@If(Sign!="1"&@Attachments>0; @If(@Prompt([YESNO];"Mail not signed yet"; "This mail carries "+@Text(@Attachments)+ " attachment(s) but is not signed yet. Do you want to send it anyway?"); ""; @Return("")); ""); - Save the formula.
- Click the Send and File (Action) in the Object tab.
NOTE: If you cannot edit the Send and File (Action) in the programmer's pane, go to the Shared Code - Actions view to open the Send and File shared action instead. - In the field for the formula, add the above code to the very beginning of the formula.
- Save the formula.
- Save and close the Memo form.
You may repeat this for the Reply and Reply/History forms. Follow the above instructions for those forms.
- This modification allows you to send unsigned mail messages with attachments. When prompted, click Yes to send the message without a digital signature. Click No to stop from sending the message. The message remains open in edit mode. You can sign the email, then send it again.
- Advanced users can place this formula further down in the code after the check for the empty list of adressees.
- You can modify the formula so it warns you whether or not there are attachments in a message. In this case, use the following code instead:
@If(Sign!="1"; @If (@Prompt([YESNO];"Mail not signed yet"; "This mail is not signed yet. Do you want to send it anyway?"); ""; @Return("")); "");
-
Participate in developerWorks
blogs and get involved in the developerWorks community.




