It turned out the attachments you were using were truly massive (like 1GB). Because attachment data was kept in memory, this caused
OutOfMemoryException sooner or later.
Since Rebex Mail 1.0.3793.0, it is possible to save or send mail messages with attachments of unlimited length using the following code:
// create an e-mail
MailMessage mail = new MailMessage();
Attachment attachment = new Attachment();
attachment.Options |= MimeOptions.DoNotPreloadAttachments; // <-- this is new
// save the e-mail
// send the e-mail
Smtp smtp = new Smtp();
smtp.Options |= SmtpOptions.SendWithNoBuffer; // <-- this is new
At the moment, this doesn't work when the e-mail needs to be signed or encrypted – in that case, the content is still read into memory.