add a progress dialog.
does not work yet: continue sending emails after cancel or failure