Then if the user clicks on the email button, the file name field on the “send mail” form does not have the .pdf extension on it (see atttached screen shot)
If the user clicks in the file name field and causes this field to lose focus then the .pdf extension gets added on to the end of the file name.
But in this scenario, the user will not do this because the filename and file type have been preset in the code. When they don’t do this, an email is created that has no extension!! (see the second attachment)
Clearly the “Send email” button needs to do the addition of the extension to the file name rather than a lose focus event on the filename textbox.