Пример #1
0
        public void SendJobApplication(SpontaneousApplyDto jobApplication)
        {
            var sendTo = ConfigSettingsHandler.ReadSetting(Constants.JobApplicationToKey);

            var listOfAttachments = new List <FileAttachmentDto>
            {
                new FileAttachmentDto {
                    FileStream = jobApplication.CvStream, FileType = jobApplication.CvMimeType, FileName = jobApplication.CvFileName
                },
                new FileAttachmentDto {
                    FileStream = jobApplication.CoverLetterStream, FileType = jobApplication.CoverLetterMimeType, FileName = jobApplication.CoverLetterFileName
                }
            };

            _emailHandler.SendEmail(sendTo, ConstructEmailSubject(jobApplication), ConstructBodyMessage(jobApplication), listOfAttachments, true);
        }
Пример #2
0
        public void SendContactMessage(ContactMessageDto contactData)
        {
            var sendTo = ConfigSettingsHandler.ReadSetting(Constants.ContactToKey);

            _emailHandler.SendEmail(sendTo, contactData.Subject, ConstructBodyMessage(contactData), true);
        }