public MailSatellite(FindAttachments findAttachments, CleanAttachments cleanAttachments, BuildSmtpClient buildSmtpClient, IMessageSerializer serializer) { this.findAttachments = findAttachments; this.cleanAttachments = cleanAttachments; this.buildSmtpClient = buildSmtpClient; this.serializer = serializer; }
/// <summary> /// Register attachment discovery and cleanup. /// </summary> public void UseAttachmentFinder( FindAttachments findAttachments, CleanAttachments cleanAttachments) { Guard.AgainstNull(nameof(findAttachments), findAttachments); Guard.AgainstNull(nameof(cleanAttachments), cleanAttachments); var settings = config.GetSettings(); settings.Set <FindAttachments>(findAttachments); settings.Set <CleanAttachments>(cleanAttachments); }