How to send pdf link to the user only when the checkbox is checked?