Back

AWS SES

  • 0
  • Self Hosted
  • Messaging
Mazahir
11 Apr, 2024, 08:44

How can i setup SES with appwrite

TL;DR
Developers are experiencing connectivity issues with AWS SES when integrating it with Appwrite Version 1.5.3. The error message indicates a problem with SMTP connection. The solution involves checking SMTP credentials and making sure the correct host, port, secure settings, and authentication details are used. Also, ensure that SES is properly set up within Appwrite.
Mazahir
11 Apr, 2024, 08:46

I have checked the creds. They work fine. I can send Emails using Node js

TypeScript
import { createTransport } from "nodemailer";

const trans = createTransport({
  host: "email-smtp.us-east-1.amazonaws.com",
  port: 2465, // Port for SMTP
  secure: true,
  auth: {
    user: "some", // Your SMTP username provided by SES
    pass: "sdhd", // Your SMTP password provided by SES
  },
});
const mailOptions = {
  from: "test@test.com", // Sender's email address
  to: "recipient@test.com", // Recipient's email address
  subject: "Test Email", // Subject line
  text: "This is a test email sent using Amazon SES SMTP credentials in Node.js.", // Plain text body
};

trans.sendMail(mailOptions, (error, info) => {
  if (error) {
    console.error("Error occurred:", error.message);
    return;
  }
  console.log("Email sent successfully:", info.response);
});
Mazahir
11 Apr, 2024, 08:48

But when i add the same Creds in appwrite. and run Appwrite doctor.

I get this

TypeScript
[Connectivity]
🟒 Console.DB(console)...............................connected
🟒 Projects.DB(database_db_main).....................connected
🟒 Cache(cache_redis_main)...........................connected
🟒 Queue(queue)......................................connected
🟒 PubSub(pubsub)....................................connected



Deprecated: Implicit conversion from float 0.2 to int loses precision in /usr/src/code/src/Appwrite/Platform/Tasks/Doctor.php on line 196

[Volumes]
πŸ”΄ SMTP...........................................disconnected
🟒 Uploads Volume is readable
🟒 Uploads Volume is writeable
🟒 Cache Volume is readable
🟒 Cache Volume is writeable
🟒 Config Volume is readable
🟒 Config Volume is writeable
🟒 Certs Volume is readable
🟒 Certs Volume is writeable

And also tried to add it as a email provider. but i get error there also.

TypeScript
Failed sending to target test@gmail.com with error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Mazahir
11 Apr, 2024, 08:49

More info. I am using Appwrite Version 1.5.3

Mazahir
11 Apr, 2024, 08:49

Any help would be appreciated

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more