You could try something like:
(echo -n; sleep 5; cat tempfile) | mail.domain.com 25
to open the connection and write nothing, wait for 5 seconds and write the rest.