The following parameters can be appended to the end of an Apex button or to the end of an S-Doc creation call:

ButtonValuesFunction
&prepemail=1 to enable, 0 to disable (disabled by default)This will create but not automatically send an email
&did=Comma delimited list of IDs for documents from your “Documents” tabFor attaching documents to your email.
&aid=Comma delimited list of IDs for attachments on a record’s “Attachments” related listFor attaching attachments to your email.
&autoopen=1 to enable, 0 to disable (disabled by default)This will make the document automatically open after being generated. Note that this shouldn’t be used on calls to create S-Docs, since users aren’t explicitly creating these documents in the way that they do with an Apex button.
&sendemail=1 to enable, 0 to disable (disabled by default)This will create and automatically send an email.