Create an Invoice and send it by EMAIL using SAGE SDK

Hey Guys, 

I installed the Sage SDK and created a easy app to create an invoice. all is good, except i can't figure out how to have the invoice sent itself by email? 

Also because i am not printing the invoice the SDK stops and asked me if i'm sure to continue.

I would like the SDK to create my invoices automatically so how can i avoid it getting stuck?