Official Spring Boot starter for the Mailvoidr transactional email API.
Use this when SMTP port 587 is unavailable — the HTTP API delivers the same way.
After the first Maven Central release:
<dependency>
<groupId>com.mailvoidr</groupId>
<artifactId>mailvoidr-spring-boot-starter</artifactId>
<version>0.1.0</version>
</dependency>Until then, build locally:
cd sdks/springboot
mvn installMAILVOIDR_API_KEY=mvdr_live_your_key_here
MAILVOIDR_FROM_ADDRESS=hello@mail.yourdomain.com
MAILVOIDR_FROM_NAME=AcmeOr in application.yml:
mailvoidr:
api-key: mvdr_live_your_key_here
from-address: hello@mail.yourdomain.com
from-name: Acmeimport com.mailvoidr.springboot.MailvoidrClient;
import com.mailvoidr.springboot.model.SendEmailRequest;
import org.springframework.stereotype.Service;
@Service
public class WelcomeService {
private final MailvoidrClient mailvoidr;
public WelcomeService(MailvoidrClient mailvoidr) {
this.mailvoidr = mailvoidr;
}
public void sendWelcome(String to) {
var response = mailvoidr.send(SendEmailRequest.builder()
.to(List.of(to))
.subject("Welcome to Acme")
.html("<h1>Hey there</h1>")
.trackOpens(true)
.trackClicks(true)
.build());
mailvoidr.getSend(response.id());
}
}mailvoidr.send(SendEmailRequest.builder()
.to(List.of("user@example.com"))
.templateId("01HXYZ...")
.variables(Map.of("name", "Riya"))
.build());If your service already builds SendGrid v3 payloads, convert them before sending:
import com.mailvoidr.springboot.adapter.SendGridEmailAdapter;
SendEmailRequest request = SendGridEmailAdapter.toSendEmailRequest(sendGridPayload);
mailvoidr.send(request);MailvoidrException includes the HTTP status and validation errors map for 402, 403, 422, and other API failures.
mvn verifySee PUBLISHING.md for Maven Central release steps.