Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Elastic Email Adapter #46

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Vishalk91-4
Copy link

What does this PR do?

This PR contains an implementation of the ElasticEmail transactional email adapter.

Test Plan for Elastic Email Integration

This document outlines the steps to set up and test Elastic Email for your project.

1. Sign up for an Elastic Email Account

If you don't already have an Elastic Email account, visit Elastic Email's website and sign up for an account. Follow the on-screen instructions to complete the registration.

2. Obtain Elastic Email API Credentials

After registering and logging into your Elastic Email account, you'll need to obtain your API credentials.

  • In the Elastic Email dashboard, navigate to the API section.
  • Generate an API Key if you don't already have one. Make sure to save it securely.

3. Install Relevant Dependencies

Before testing your project with Elastic Email, ensure that you have the necessary dependencies installed.

PHP Extensions

You'll need specific PHP extensions to interact with Elastic Email. Use the following commands to install them on Linux-based systems:

sudo apt update && sudo apt install php-curl php-mbstring php-xml

Composer Dependencies

If you haven't already installed Composer, follow the installation instructions at Composer's website.

Next, install the project dependencies using Composer. In your project directory, run:

composer install

4. Set Environment Variables

To run tests with Elastic Email, you'll need to set up relevant environment variables.

ELASTIC_EMAIL_API_KEY: Your Elastic Email API key.
TEST_EMAIL: The recipient's email address.
TEST_EMAIL_FROM: The sender's email address.
You can set these environment variables in your system or in a configuration file specific to your project.

5. Test the Project

With all the preparations in place, you can now test your project's integration with Elastic Email.

Use the following command to initiate the test:

ELASTIC_EMAIL_API_KEY=<YOUR_ELASTIC_EMAIL_API_KEY> TEST_EMAIL=<YOUR_RECIPIENT_EMAIL> TEST_EMAIL_FROM=<YOUR_SENDER_EMAIL> ./vendor

Replace <YOUR_ELASTIC_EMAIL_API_KEY>, <YOUR_RECIPIENT_EMAIL>, and <YOUR_SENDER_EMAIL> with your actual Elastic Email API key, recipient email address, and sender email address.

Ensure that your project interacts with Elastic Email as expected and that emails are sent successfully.

Related PRs and Issues

closes: appwrite/appwrite#6387

Have you read the Contributing Guidelines on issues?

YES

Copy link
Contributor

@wess wess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestions made, make sure to also run pint/linter.

@@ -6,6 +6,7 @@ services:
- MAILGUN_API_KEY
- MAILGUN_DOMAIN
- SENDGRID_API_KEY
- ElasticEmail_API_KEY
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this all caps like the others.

*/
public function testSendEmail()
{
$key = getenv('ElasticEmail_API_KEY');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capitalize keys

@Vishalk91-4
Copy link
Author

@wess, I've capitalized them, could you please review it now

@Vishalk91-4
Copy link
Author

@wess, could you please review this PR and merge the same

@wess
Copy link
Contributor

wess commented Oct 17, 2023

Looks like the linter is failing, please be sure to run pint.

@Vishalk91-4
Copy link
Author

@wess, applied the linter, could you please review it and merge this pull request

@Haimantika
Copy link

@wess, applied the linter, could you please review it and merge this pull request

Please request a review from Wess

@gewenyu99
Copy link

Hey there! There were a lot of big PRs during this Hacktoberfest, and we wanted to give everyone ample time to collaborate with our engineering team. If you were able to merge your PRs during October, amazing. If it’s still not merged, don’t worry about it either. Either way, we’ve got your Hacktoberfest swag minted and ready to ship.

Please comment with your Discord username here so we can contact you about your shipping information to deliver your Hacktoberfest swag.

@Vishalk91-4
Copy link
Author

Hey there! There were a lot of big PRs during this Hacktoberfest, and we wanted to give everyone ample time to collaborate with our engineering team. If you were able to merge your PRs during October, amazing. If it’s still not merged, don’t worry about it either. Either way, we’ve got your Hacktoberfest swag minted and ready to ship.

Please comment with your Discord username here so we can contact you about your shipping information to deliver your Hacktoberfest swag.

Discord Username : vishalk_iitbhu

@gewenyu99
Copy link

Will reach out soon! Putting together forms for everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💬 Improve Appwrite Messaging with ElasticEmail Adapter
4 participants