Configuring in application.properties for spring.mail related properties are good enough to do Autowire of JavaMailSender. In our case, someone also had Bean declaration and hence this was taking precedence over application.properties. Hence, Autowired was not showing. I hope this helps one.