Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
com.github.migangqui:spring-email-api-kotlin
Advanced tools
It is an API for Java and Kotlin to send emails with Spring. To add to your project...
For Java:
<dependency>
<groupId>com.github.migangqui</groupId>
<artifactId>spring-email-api-java</artifactId>
<version>${currentVersion}</version>
</dependency>
implementation 'com.github.migangqui:spring-email-api-java:${currentVersion}'
For Kotlin:
<dependency>
<groupId>com.github.migangqui</groupId>
<artifactId>spring-email-api-kotlin</artifactId>
<version>${currentVersion}</version>
</dependency>
implementation 'com.github.migangqui:spring-email-api-kotlin:${currentVersion}'
${currentVersion}
is 1.2.0
spring:
mail:
default-encoding: UTF-8
host: # for example: smtp.gmail.com
username: # Your email
password: # Your email pass
port: # SMPT port, for exaple: 25, 587
properties:
mail:
transport.protocol: smtp
# Optional properties
# smtp:
# ssl:
# trust: '*'
# auth: true
# starttls:
# enable: true
# required: true
Add @EnableAsync
annotation in your Spring Application class to enable async send method.
It's not necessary add the package to component scan with this new version.
You have to inject EmailSender
as dependency in your Spring component. The service provide these methods:
public interface EmailSender {
SendEmailResult send(Email email);
Future<SendEmailResult> sendAsync(Email email);
}
interface EmailSender {
fun send(email: Email): SendEmailResult
fun sendAsync(email: Email): Future<SendEmailResult>
}
FAQs
Kotlin API to send emails in Spring
We found that com.github.migangqui:spring-email-api-kotlin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.