Updated SMTP code for new IPC calls