Benny from MailMate made the script for me. Works as expected.
Path of the file should be "~/Library/Application Support/Alfred 2/Plugins/Email/MailMate.applescript"
Here is the script:
-- Send an email with an attachment
return do shell script "printf " & quoted form of theText & " | xxd -u -plain | sed 's/\\(..\\)/%\\1/g' | tr -d '\\n'"
on create_mailto(_subject, _body, _attachments, _email, _name)
set _to to _email
if (_name is not "") then
set _to to _name & " <" & _email & ">"
set _mailto to "mailto:?to=" & url_encode(_to) & "&subject=" & url_encode(_subject) & "&body=" & url_encode(_body)
repeat with _attachment in _attachments
set _filePath to POSIX path of _attachment
set _mailto to _mailto & "&attachment-url=file://" & url_encode(_filePath)
on send_email_with_attachment(ename, eemail, esubject, ebody, eattachment)
set _mailto to create_mailto(esubject, ebody, eattachment, eemail, ename)
tell application "MailMate"
open location _mailto with trust
or you can download the file from here.