Create PDF on client side using jsPDF and send it as a mail attachment. Check out the demo here http://pdfnmail.gear.host
This project is an ASP.Net MVC application which demonstrates how to create PDF on client side using jsPDF and send it to server as a base64 string. Then server will convert PDF file from the base64 string and mail that file as attachment.
Download the source and update the web.config
smtp configurations. And fire the application!
<smtp from="[email protected]" deliveryMethod="Network">
<network
defaultCredentials="false"
host="smtp.yourmail.com"
port="port-number"
userName="[email protected]"
password="xxxxxxxx"
enableSsl="true" />
</smtp>
- jsPDF - PDF generator using JavaScript.
- Toastr.js - Non-blocking toasts.
- NProgess - Slim progress bar.
- jQuery - You know!!
- If project does't build check you have enabled nuget package restore (or) download missing packages in the settings.
- If your facing error in sending mail be sure check mail provider's security settings.