public async Task <IActionResult> PutMessageFromPastSelf(long id, MessageFromPastSelf messageFromPastSelf)
        {
            if (id != messageFromPastSelf.Id || !EmailValidator.Validate(messageFromPastSelf.To) || messageFromPastSelf.Body.Length < 1)
            {
                return(BadRequest());
            }
            var jobid = _mailService.updateEmail(messageFromPastSelf);

            messageFromPastSelf.jobid = jobid;
            _context.Entry(messageFromPastSelf).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!MessageFromPastSelfExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }