Skip to content

Autowire JavaMailSender with spring-boot-starter-mail not working? #2876

@esodot

Description

@esodot

Hello,
trying to autowire JavaMailSender after adding:

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>   

to my POM.xml, like so:

@Autowired
private JavaMailSender sender;

but getting everytime:
No qualifying bean of type org.springframework.mail.javamail.JavaMailSender found for dependency

My application contains also all properties needed (spring.mail.*)
Is there i'am doing wrong?
Greetings
Alex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions