suspend fun sendPasswordRecoveryEmail(userEmail: String,context: Context) {
val account = Account(client)
try {
account.createRecovery(
email = userEmail,
url = "https://Showgo.in/reset-password"
)
withContext(Dispatchers.Main) {
Toast.makeText(
context,
"Reset email sent successfully!",
Toast.LENGTH_LONG
).show()
}
} catch (e: AppwriteException) {
withContext(Dispatchers.Main) {
Log.e("AppwriteRepository", "Error sending reset email: ${e.message}")
Toast.makeText(
context,
"Failed to send reset email: ${e.message}",
Toast.LENGTH_LONG
).show()
}
}
}
#not receiving mails from custom SMTP server setup on appwrite
4 messages · Page 1 of 1 (latest)