/guicedee-mail-client:guicedee-mail-clientfrom guicedee-mail-client
Annotation-driven SMTP mail client for Guiced using Vert.x Mail Client. Configure connections, send emails with attachments, TLS, and DKIM via Guice injection.
Ships in guicedee-mail-client. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Annotation-driven SMTP mail client for Guiced using the Vert.x Mail Client.
Declare SMTP connections with annotations — everything is discovered at startup via ClassGraph, wired through Guice, and managed by the Vert.x Mail Client with connection pooling.
guiced.net:mail-client dependency.package-info.java (preferred) or any class:
@MailConnectionOptions(
value = "notifications",
hostname = "smtp.example.com",
port = 587,
startTls = MailConnectionOptions.StartTLSMode.REQUIRED,
login = MailConnectionOptions.LoginMode.REQUIRED,
username = "[email protected]",
password = "secret",
defaultFrom = "[email protected]"
)
package com.example.mail;
public class NotificationService {
@Inject @Named("notifications")
private MailService mailService;
public Future<MailResult> sendWelcome(String to) {
return mailService.sendHtml(to, "Welcome!", "<h1>Welcome aboard!</h1>");
}
}
MailMessage message = new MailMessage()
.setTo("[email protected]")
.setSubject("Report")
.setText("See attached.")
.setAttachment(List.of(
MailAttachment.create()
.setContentType("application/pdf")
.setName("report.pdf")
.setData(Buffer.buffer(pdfBytes))
));
mailService.send(message);
module-info.java:
module my.app {
requires com.guicedee.mailclient;
opens my.app.mail to com.google.guice, com.guicedee.mailclient;
}
@MailConnectionOptionsSMTP connection configuration: hostname, port, StartTLS, SSL, login credentials, connection pooling, DKIM, keep-alive, default from address. Targets TYPE and PACKAGE.
| Binding | Key | Description |
|---|---|---|
MailService | @Named("connection-name") | High-level mail service with convenience send methods |
MailClient | @Named("connection-name") | Raw Vert.x mail client per connection |
Every annotation attribute can be overridden via system properties or environment variables at runtime, scoped by connection name:
MAIL_{NORMALIZED_NAME}_{PROPERTY} — name-specific overrideMAIL_{PROPERTY} — global fallbackExamples:
MAIL_NOTIFICATIONS_HOSTNAME=smtp.prod.example.comMAIL_NOTIFICATIONS_USERNAME=prod-userMAIL_NOTIFICATIONS_PASSWORD=prod-secretMAIL_PORT=465 (global fallback)IGuiceContext.instance().inject()
└─ MailClientPreStartup (annotation scanning)
├─ Discovers @MailConnectionOptions (classes and package-info.java)
└─ Wraps with environment variable resolution
└─ MailClientModule (Guice bindings)
├─ Creates shared MailClient per connection (pooled)
├─ Binds MailClient as @Named("connection-name")
└─ Binds MailService as @Named("connection-name") singleton
└─ MailClientPostStartup (initialization logging)
└─ MailClientPreDestroy (shutdown)
└─ Closes all mail clients
| Method | Description |
|---|---|
send(MailMessage) | Send a pre-built message (auto-fills from if defaultFrom set) |
sendText(to, subject, text) | Send plain text using default from |
sendText(from, to, subject, text) | Send plain text with explicit from |
sendHtml(to, subject, html) | Send HTML using default from |
sendHtml(from, to, subject, html) | Send HTML with explicit from |
sendMultipart(from, to, subject, text, html) | Send multipart (text + HTML) |
getMailClient() | Access underlying Vert.x MailClient |
All send methods return io.vertx.core.Future<io.vertx.ext.mail.MailResult>. Return or compose that future so the caller observes failure; invoking a send method does not prove successful delivery. sendMultipart takes List<String> recipients.
requires com.guicedee.mailclient;.opens to com.google.guice and com.guicedee.mailclient.@MailConnectionOptions can be placed on package-info.java (preferred) or any class.module-info.java + META-INF/services/).What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub guicedee/ai-rules --plugin guicedee-mail-client