[PR #524] [MERGED] feat: support send mail from admin portal(no balance limit) #602

Closed
opened 2026-02-26 21:31:59 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/524
Author: @dreamhunter2333
Created: 12/22/2024
Status: Merged
Merged: 12/22/2024
Merged by: @dreamhunter2333

Base: mainHead: feature/dev


📝 Commits (1)

  • 8c30c5e feat: support send mail from admin portal(no balance limit)

📊 Changes

9 files changed (+245 additions, -9 deletions)

View changed files

📝 CHANGELOG.md (+3 -1)
📝 frontend/src/views/Admin.vue (+6 -0)
frontend/src/views/admin/SendMail.vue (+199 -0)
📝 worker/src/admin_api/index.ts (+4 -0)
worker/src/admin_api/send_mail.ts (+22 -0)
📝 worker/src/mails_api/send_mail_api.ts (+5 -2)
📝 worker/src/user_api/oauth2.ts (+2 -2)
📝 worker/src/user_api/passkey.ts (+2 -2)
📝 worker/src/user_api/user.ts (+2 -2)

📄 Description

User description

#523


PR Type

Enhancement, Bug fix


Description

  • Added SendMail component to the admin portal for sending emails.
  • Implemented new API endpoint /admin/send_mail for sending emails by admin without balance limit.
  • Updated sendMail function to support admin email sending.
  • Extended JWT expiration from 30 to 90 days in multiple user APIs.
  • Updated changelog with recent changes and fixes.

Changes walkthrough 📝

Relevant files
Enhancement
8 files
Admin.vue
Add `SendMail` tab and localization in Admin view               

frontend/src/views/Admin.vue

  • Imported SendMail component.
  • Added sendMail tab with localization for English and Chinese.
  • +6/-0     
    SendMail.vue
    Create `SendMail` component for admin email functionality

    frontend/src/views/admin/SendMail.vue

  • Created SendMail component for sending emails.
  • Implemented form with fields for sender and recipient details,
    subject, and content.
  • Added support for text, HTML, and rich text content types.
  • Integrated WYSIWYG editor for rich text.
  • +199/-0 
    index.ts
    Add endpoint for sending emails by admin                                 

    worker/src/admin_api/index.ts

  • Imported sendMailbyAdmin function.
  • Added POST endpoint /admin/send_mail for sending emails.
  • +4/-0     
    send_mail.ts
    Implement `sendMailbyAdmin` function for admin email sending

    worker/src/admin_api/send_mail.ts

  • Created sendMailbyAdmin function to handle email sending.
  • Integrated with sendMail function from send_mail_api.
  • +22/-0   
    send_mail_api.ts
    Update `sendMail` function to support admin email sending

    worker/src/mails_api/send_mail_api.ts

  • Updated sendMail function to support admin email sending without
    balance limit.
  • +5/-2     
    oauth2.ts
    Extend JWT expiration to 90 days in OAuth2 API                     

    worker/src/user_api/oauth2.ts

    • Extended JWT expiration from 30 to 90 days.
    +2/-2     
    passkey.ts
    Extend JWT expiration to 90 days in Passkey API                   

    worker/src/user_api/passkey.ts

    • Extended JWT expiration from 30 to 90 days.
    +2/-2     
    user.ts
    Extend JWT expiration to 90 days in User API                         

    worker/src/user_api/user.ts

    • Extended JWT expiration from 30 to 90 days.
    +2/-2     
    Documentation
    1 files
    CHANGELOG.md
    Update changelog with recent changes and fixes                     

    CHANGELOG.md

  • Added entry for admin email sending feature.
  • Fixed documentation errors.
  • Fixed GitHub Action deployment branch issue.
  • +3/-1     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information


    🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

    ## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/524 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 12/22/2024 **Status:** ✅ Merged **Merged:** 12/22/2024 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/dev` --- ### 📝 Commits (1) - [`8c30c5e`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/8c30c5e1d9a2df8e9eb15d73e959bce01338d287) feat: support send mail from admin portal(no balance limit) ### 📊 Changes **9 files changed** (+245 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -1) 📝 `frontend/src/views/Admin.vue` (+6 -0) ➕ `frontend/src/views/admin/SendMail.vue` (+199 -0) 📝 `worker/src/admin_api/index.ts` (+4 -0) ➕ `worker/src/admin_api/send_mail.ts` (+22 -0) 📝 `worker/src/mails_api/send_mail_api.ts` (+5 -2) 📝 `worker/src/user_api/oauth2.ts` (+2 -2) 📝 `worker/src/user_api/passkey.ts` (+2 -2) 📝 `worker/src/user_api/user.ts` (+2 -2) </details> ### 📄 Description ### **User description** #523 ___ ### **PR Type** Enhancement, Bug fix ___ ### **Description** - Added `SendMail` component to the admin portal for sending emails. - Implemented new API endpoint `/admin/send_mail` for sending emails by admin without balance limit. - Updated `sendMail` function to support admin email sending. - Extended JWT expiration from 30 to 90 days in multiple user APIs. - Updated changelog with recent changes and fixes. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>8 files</summary><table> <tr> <td> <details> <summary><strong>Admin.vue</strong><dd><code>Add `SendMail` tab and localization in Admin view</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/src/views/Admin.vue <li>Imported <code>SendMail</code> component.<br> <li> Added <code>sendMail</code> tab with localization for English and Chinese.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/524/files#diff-78137b072a7fa52c6d503efb9a3d32c07da5073dd5ca32ac48b1402ac2481a55">+6/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>SendMail.vue</strong><dd><code>Create `SendMail` component for admin email functionality</code></dd></summary> <hr> frontend/src/views/admin/SendMail.vue <li>Created <code>SendMail</code> component for sending emails.<br> <li> Implemented form with fields for sender and recipient details, <br>subject, and content.<br> <li> Added support for text, HTML, and rich text content types.<br> <li> Integrated WYSIWYG editor for rich text.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/524/files#diff-e97f0c670363e26454e5d6da907cb147c34f55f3108bb4a12391da5f6be65d98">+199/-0</a>&nbsp; </td> </tr> <tr> <td> <details> <summary><strong>index.ts</strong><dd><code>Add endpoint for sending emails by admin</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/admin_api/index.ts <li>Imported <code>sendMailbyAdmin</code> function.<br> <li> Added POST endpoint <code>/admin/send_mail</code> for sending emails.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/524/files#diff-b470c4c47ce4a700cd8aac644d07d8a747d439bb6d69e9392a198b3a931fe2e7">+4/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>send_mail.ts</strong><dd><code>Implement `sendMailbyAdmin` function for admin email sending</code></dd></summary> <hr> worker/src/admin_api/send_mail.ts <li>Created <code>sendMailbyAdmin</code> function to handle email sending.<br> <li> Integrated with <code>sendMail</code> function from <code>send_mail_api</code>.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/524/files#diff-5c5b0e681d07489cabf31ae33b04f13ca097b6d3dd654218b37916cd3b35c15f">+22/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>send_mail_api.ts</strong><dd><code>Update `sendMail` function to support admin email sending</code></dd></summary> <hr> worker/src/mails_api/send_mail_api.ts <li>Updated <code>sendMail</code> function to support admin email sending without <br>balance limit.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/524/files#diff-92070e9d7b3228209a2024053eb4429a76907de17f9566b97b22d0d12e4e0934">+5/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>oauth2.ts</strong><dd><code>Extend JWT expiration to 90 days in OAuth2 API</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/user_api/oauth2.ts - Extended JWT expiration from 30 to 90 days. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/524/files#diff-fede9bc68112c797eefa07c6e6cc20a6aa107addb3e5636757131589a435e13b">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>passkey.ts</strong><dd><code>Extend JWT expiration to 90 days in Passkey API</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/user_api/passkey.ts - Extended JWT expiration from 30 to 90 days. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/524/files#diff-cabc4dc44f7dd8ba02ec517fb6cf097f5f71e2fd01d122d55d306c119600684f">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>user.ts</strong><dd><code>Extend JWT expiration to 90 days in User API</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/user_api/user.ts - Extended JWT expiration from 30 to 90 days. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/524/files#diff-aafbb1e6861a3f5ecb2bd9d51e2bf9f11f13aa96302eb755f91c233bae2a296e">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1 files</summary><table> <tr> <td> <details> <summary><strong>CHANGELOG.md</strong><dd><code>Update changelog with recent changes and fixes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> CHANGELOG.md <li>Added entry for admin email sending feature.<br> <li> Fixed documentation errors.<br> <li> Fixed GitHub Action deployment branch issue.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/524/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed">+3/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:31:59 +03:00
    Sign in to join this conversation.
    No milestone
    No project
    No assignees
    1 participant
    Notifications
    Due date
    The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

    No due date set.

    Dependencies

    No dependencies set.

    Reference
    starred/cloudflare_temp_email#602
    No description provided.