/// <summary> /// Get an <see cref="IMailService"/> instance. /// </summary> /// <returns> /// An existing <see cref="IMailService"/> instance if available; otherwise a fresh instance. /// </returns> public IMailService GetMailService() { if (this.mailService == null) { this.mailService = new MailService(modId, mailManager); mailManager.RegisterMailSender(modId, mailService); } return(mailService); }