53deb8e9a8
Tipos: EmailAttachment, EmailMessage, SMTPConfig. Puras: email_build_html, email_build_text, email_with_attachment, email_template_render. Impuras: smtp_connect (TLS/STARTTLS/plain), smtp_send (MIME multipart con adjuntos). Solo stdlib: net/smtp, crypto/tls, text/template, mime/multipart. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| email_build_text | function | go | infra | 1.0.0 | pure | func EmailBuildText(from string, to []string, subject, bodyText string) EmailMessage | Construye un EmailMessage con cuerpo de texto plano. Retorna una nueva estructura sin CC, BCC, adjuntos ni headers custom. |
|
|
|
false |
|
EmailMessage listo para enviar con cuerpo de texto plano | true |
|
functions/infra/email_build_test.go | functions/infra/email_build_text.go |
Ejemplo
msg := EmailBuildText(
"alice@example.com",
[]string{"bob@example.com"},
"Alerta critica",
"El servidor cayó a las 03:42 UTC.",
)
// msg.BodyText = "El servidor cayó a las 03:42 UTC."
// msg.BodyHTML = ""
Notas
Funcion pura. Analogo de EmailBuildHTML para texto plano. Para anadir adjuntos usar EmailWithAttachment.