Attach File Through mailto URI

后端 未结 2 1323
悲哀的现实
悲哀的现实 2020-11-30 15:01

Is it possible to attach a file using \"mailto:\" redirect in javascript?

Something like this:

document.location = \"mailto:\"+recipient+\"?subject=\         


        
2条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-30 15:32

    You can create a custom email form, letting the user input a valid email-address if necessary and send this to the server. The server then can use a mail library to send an email including an attachment.

    If you use PHP, you can easily do this using PHPMailer.

提交回复
热议问题