adding id and mime to attachments

Conflicts:
	js/mail.js
	templates/index.php
different templates for single and multiple attachments