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

Add Adapters and tests for Mailtrap. #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Yash7426
Copy link

@Yash7426 Yash7426 commented Oct 2, 2023

What does this PR do?

This PR implements Mailtrap Email adapter.

Test Plan for Running the Mailtrap E2E Test

By default, the Mailtrap E2E test is marked as skipped.

To execute the Mailtrap E2E test suite, you will need a Mailtrap account with a domain attached and two valid email addresses associated with that domain. Please follow these steps:

  1. Create a Mailtrap Account:

  2. Set Up a Sender Signature:

    • Set up a Sender Signature within your Mailtrap account, following the steps provided by Mailtrap.
  3. Prepare Email Addresses:

    • Ensure you have two email addresses available within your Mailtrap account, both associated with the same domain as your Sender Signature.
  4. Obtain Mailtrap API Key:

    • Obtain your Mailtrap API key from the Mailtrap dashboard. You can usually find it in your account settings.
  5. Install PHPUnit and Dependencies:

    • Open a terminal and navigate to the root directory of your 'utopia-php/messaging' project.
    • Run the following command to install PHPUnit and related packages using Composer:
      composer install
  6. Run E2E Tests:

    • With the required setup complete, you can now execute the E2E tests, providing the necessary environment variables. Replace YOUR_MAILTRAP_API_KEY, YOUR_TEST_EMAIL, and YOUR_TEST_FROM_EMAIL with your actual Mailtrap API key, test email address, and from email address, respectively. Make sure that YOUR_TEST_EMAIL and YOUR_TEST_FROM_EMAIL belong to the same domain as your Sender Signature.

      MAILTRAP_API_KEY=YOUR_MAILTRAP_API_KEY   TEST_EMAIL=YOUR_TEST_EMAIL TEST_FROM_EMAIL=YOUR_TEST_FROM_EMAIL ./vendor/bin/phpunit tests/e2e/Email/MailtrapTest.php

Related PRs and Issues

Closes: appwrite/appwrite#6391

Have you read the Contributing Guidelines on issues?

Yes

@gewenyu99
Copy link

Hey,

Due to time constraints, I'm going to mark this PR hacktoberfest-accepted for now so you get DO's Hacktoberfest rewards. We'll continue to work with you on this issue for review and merge.

When it is merged, we'll contact you for Appwrite-specific Hacktoberfest swag.

Thanks for helping us improve Appwrite!

@wess
Copy link
Contributor

wess commented Nov 14, 2023

Please make sure to run the linter's formatter

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 Mailtrap Adapter
3 participants