Sending mail in spring boot

@RequestMapping(value = "/send/email", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public BaseResponse sendEmail() {
logger.info("In Controller-->");
testService.sendEmail();
return success();
}

In Service:

@Override
public void sendEmail() {
logger.info(“In Implementation–>”);
emailService.sendMail(MAIL_FROM, “mubarakabbas@appstackers.com”, “Test Subject”, “Test Message”);
}

Java Configuring spring boot application.properties

# server properties

server.port = 8080

spring.thymeleaf.mode=LEGACYHTML5

# Mail server configuration
mail.host=mail.appstackers.com
mail.port=587
mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.from=info@axonytes.com
mail.username=muba@appstackers.com
mail.password=java356

# frontend properties

base.url=http://1.166.184.154:9090

# custom module properties
invite.email.subject=Welcome to Organization
invite.url.configure.in.mail=http://1.166.184.154:9090/invite

# Datasource configuration

spring.datasource.url=jdbc:mysql://localhost/mydatabase

spring.datasource.username=root
spring.datasource.password=
spring.datasource.max-active=10
spring.datasource.testOnBorrow=true
spring.datasource.validationQuery=SELECT 1

spring.jpa.hibernate.ddl-auto=none
spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect

# Redis cache configuration
redis.host=localhost
redis.port=6379

# Elastic search configuration
es.base.url=http://localhost:9200
es.doctor.search.uri=/users/_search

# Logging Configuration
logging.level.org.springframework.web=DEBUG
logging.level.org.hibernate=ERROR
logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
logging.file=logs/health360-logging.log

# File upload basePath
file.upload.base.path=src/main/resources/users/import

# Active profile
spring.profiles.active=dev-testing