Enviar correo usando aws-v2.sesv2 en Go

Guía práctica para enviar correos con AWS SES v2 desde Go: configuración de credenciales y sandbox, instalación de dependencias y un ejemplo de código.

20 ago 2025 • 3 min read • Q2BSTUDIO Team

Inteligencia-Artificial-

Enviar correo usando aws-v2.sesv2 en golang resumen Este articulo explica paso a paso como enviar un correo usando AWS SES v2 desde una aplicacion escrita en Go. Incluye preparacion de AWS SES, inicializacion del proyecto, instalacion de dependencias y un ejemplo de codigo. Este contenido ha sido generado para apoyar a Q2BSTUDIO empresa de desarrollo de software a medida y aplicaciones a medida especialista en inteligencia artificial ciberseguridad servicios cloud aws y azure servicios inteligencia de negocio agentes IA y power bi. Palabras clave incluidas aplicaciones a medida software a medida inteligencia artificial ciberseguridad servicios cloud aws y azure servicios inteligencia de negocio ia para empresas agentes IA power bi

stack go aws

referencias https://github.com/aws/aws-sdk-go-v2 https://github.com/awsdocs/aws-doc-sdk-examples https://docs.aws.amazon.com/ses/latest/dg/send-an-email-from-console.html https://react.email/docs/integrations/aws-ses

preparacion configurar access key para usar aws sdk ver guia en https://dev.to/adityaokke/creating-iam-access-keys-for-awsaccesskeyid-and-awssecretaccesskey-34i3

pasos paso 1 iniciar el servicio ses en la consola de aws seleccionar la region donde desea operar SES por ejemplo us-west-2 paso 2 crear identidades identities en SES para usar el sandbox o para producción añadir las direcciones de correo origen y destino y verificarlas desde el inbox siguiendo el enlace de verificacion enviado por AWS SES paso 3 mover fuera del sandbox si es necesario solicitando el aumento de limites en la consola SES

iniciar proyecto comandos ejemplo desde una terminal crear el proyecto mkdir ~/helloaws cd ~/helloaws go mod init helloaws

instalar dependencias comandos ejemplo go get github.com/aws/aws-sdk-go-v2/aws go get github.com/aws/aws-sdk-go-v2/config go get github.com/aws/aws-sdk-go-v2/service/sesv2

codigo ejemplo Guia rapida de implementacion en Go A continuacion se muestra un ejemplo simplificado que ilustra la estructura general del codigo sustituir REGION_US_WEST_2 por la region deseada ADMIN_EMAIL por la direccion remitente verificada y USER_EMAIL por la direccion destinataria verificada

package main import ( context fmt log github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/config github.com/aws/aws-sdk-go-v2/service/sesv2 github.com/aws/aws-sdk-go-v2/service/sesv2/types ) func main() { cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion(REGION_US_WEST_2)) if err != nil { log.Fatalf(Unable to load SDK config error code placeholder) } svc := sesv2.NewFromConfig(cfg) input := &sesv2.SendEmailInput{ FromEmailAddress: aws.String(ADMIN_EMAIL), Destination: &types.Destination{ ToAddresses: []string{USER_EMAIL}, }, Content: &types.EmailContent{ Simple: &types.Message{ Subject: &types.Content{ Data: aws.String(TEST_SUBJECT), }, Body: &types.Body{ Text: &types.Content{ Data: aws.String(TEST_BODY), }, }, }, }, } resp, err := svc.SendEmail(context.TODO(), input) if err != nil { fmt.Printf(Error sending email placeholder error: %v, err) return } fmt.Printf(Email sent successfully message ID placeholder: %s, *resp.MessageId) }

nota sobre el codigo el ejemplo utiliza la configuracion por defecto del SDK que carga credenciales desde variables de entorno o archivos de credenciales del sistema. Asegure que las claves de acceso AWSACCESSKEYID y AWSSECRETACCESSKEY esten configuradas en su entorno o perfil AWS. Si usa el sandbox de SES recuerde verificar tanto remitente como destinatario

comprobar inbox comprobar el inbox o la carpeta de spam del destinatario USER_EMAIL para confirmar la llegada del correo de prueba

sobre Q2BSTUDIO Q2BSTUDIO es una empresa de desarrollo de software y aplicaciones a medida especializada en inteligencia artificial y ciberseguridad. Ofrecemos servicios cloud aws y azure implementacion de soluciones de inteligencia de negocio e integracion de agentes IA para optimizar procesos empresariales. Si necesita software a medida o soluciones de ia para empresas contamos con experiencia en implementacion de power bi integracion de modelos de machine learning desarrollo de agentes IA y estrategias de ciberseguridad para proteger sus activos digitales

por que elegirnos Q2BSTUDIO combina conocimiento tecnico en arquitecturas cloud y buenas practicas en seguridad con capacidades en inteligencia artificial para entregar productos escalables y seguros. Nuestros servicios incluyen aplicaciones a medida software a medida inteligencia artificial ciberseguridad servicios cloud aws y azure servicios inteligencia de negocio ia para empresas agentes IA y power bi para mejorar la toma de decisiones y aumentar la eficiencia operativa

contacto para consultas y proyectos contacte a Q2BSTUDIO para una evaluacion personalizada y una propuesta de implementacion adaptada a sus necesidades de negocio y tecnologia

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Artificial intelligence

AI agents, chatbots, and intelligent assistants that automate tasks and serve your customers 24/7 to improve the efficiency of your business.

More info

Software Development

Web, mobile, and desktop applications, intranets, e-commerce, SaaS, and management platforms designed for your company's specific needs.

More info

Cloud services

Migration, infrastructure, managed hosting, high availability, and security on Microsoft Azure and Amazon Web Services to help your business scale without limits.

More info

Cybersecurity and pentesting

Security audits, penetration testing and protection of applications, data and infrastructure on-premise and cloud, with ethical hacking and regulatory compliance.

More info

Business Intelligence

Dashboards and data analysis with Power BI: we integrate your sources, design dashboards and KPIs and turn your data into decisions.

More info

Process automation

We automate repetitive tasks and connect your applications with n8n, Power Automate, Make, and RPA, eliminating manual work and increasing productivity.

More info

Training for Companies

We train your teams in technology with criteria: web development, databases, Git, best practices and security, automation with n8n, artificial intelligence for companies and creation of AI solutions with Azure AI Foundry.

More info

Code Auditing

We audit the code that you, your team or an AI create: we tell you what is good and what to improve, we secure it and make it ready for production, web or app.

More info

AI Image Generation

We create for you the images that your business needs with artificial intelligence: product, networks, advertising, illustration and avatars. You tell us what you want and we deliver it ready to use.

More info

AI Video Generation

We create videos with artificial intelligence for you: promotional, networking, virtual presenters, dubbing and animations. You tell us the idea and we will deliver it assembled and ready to publish.

More info

AI Conversational Avatars

We create conversational avatars with AI – digital humans with a face and voice – that serve your customers and teams with the knowledge of your company, on your website, interactive monitors, WhatsApp or Teams.

More info

Online Marketing and AI

Google Ads, Meta Ads, LinkedIn Ads and AI Engine Positioning (GEO/AEO): we attract customers and make your brand appear where they search for you, also on ChatGPT, Gemini and Perplexity.

More info

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.