okay I got it working. for everyone who also want's to give this a try here is the code:
Code:
while read LINE
do
/usr/bin/ebook-convert "$LINE" "${LINE/.*/}.mobi"
/usr/bin/calibre-smtp from@mail.com to@mail.com "sender_name" -r senders_smtp_server -u username -a "${LINE/.*/}.mobi" -p password -e TLS --port 587
rm "${LINE/.epub/}.mobi"
done
This does: convert any file to mobi, sends this file to the kindle and then delete the mobi file again.
replace:
from@mail.com with your personal email
to@mail.com with your kindle email
sender_name with the name you want the mail send to be from (also can leave it empty)
senders_smtp_server with your outgoing smtp server (just google it)
username with your email username
password with your password
TLS either TLS or SSL depends on your providers smpt (just google it)
587 with your providers smtp port (just google it)
just start automator, do a new application add a shell-command field, paste the code, alter it and save the application. drag and drop your file onto the application and the rest will just work