You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-9Lines changed: 24 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
TrashMail is a web application for generating disposable/temporary email addresses and viewing emails sent to those addresses. The project consists of a React frontend and a Node.js and MongoDB backend mail server.
4
4
5
5
## Table of Contents
6
+
6
7
-[Frontend](#frontend)
7
8
-[Backend](#backend)
8
9
-[Deployment](#deployment)
@@ -15,6 +16,7 @@ TrashMail is a web application for generating disposable/temporary email address
15
16
The React frontend provides the user interface for generating disposable emails, viewing the inbox, and reading emails.
16
17
17
18
### Features
19
+
18
20
- Generate a random disposable email address
19
21
- Enter a custom disposable email address
20
22
- View all received emails for an address
@@ -23,17 +25,20 @@ The React frontend provides the user interface for generating disposable emails,
23
25
- Responsive design
24
26
25
27
### Tech Stack
28
+
26
29
- React
27
30
- React Router
28
31
- Material UI
29
32
- Axios
30
33
31
34
### Pages
35
+
32
36
-**Home**: Explains the service and contains buttons to generate or enter an email
33
37
-**Inbox**: Lists received emails for an address
34
38
-**Email**: Displays the content of a specific email
35
39
36
40
### Installation
41
+
37
42
```shell
38
43
39
44
cd react
@@ -42,39 +47,44 @@ npm install
42
47
```
43
48
44
49
### Running
50
+
45
51
```shell
46
52
47
53
npm start
48
54
49
55
```
56
+
50
57
The frontend will run on [http://localhost:3000](http://localhost:3000)
51
58
52
59
## Backend
53
60
54
61
The Node.js backend provides the mail server functionality for receiving emails via SMTP and managing emails via a REST API.
55
62
56
63
### Features
64
+
57
65
- SMTP server to receive emails
58
66
- Save emails and attachments to MongoDB database
59
67
- Retrieve emails for an address
60
68
- Delete emails
61
69
- Serve attachment files
62
70
63
71
### Tech Stack
72
+
64
73
- Node.js
65
74
- Express
66
75
- MongoDB
67
76
- SMTP Server
68
77
- Mailparser
69
78
70
79
### API Endpoints
71
-
-`GET /emails/:emailId` - Get emails for an address
80
+
72
81
-`GET /emails-list/:emailId` - Get email list
73
82
-`GET /all-emails` - Get all emails
74
83
-`GET /email/:emailId/:email_id` - Get specific email
This command starts the TrashMail application and exposes it on ports 4000 and 25 for mailserver.
118
134
119
135
3.**Accessing the Application**:
@@ -123,13 +139,12 @@ Ensure you have Docker installed and running on your machine before executing th
123
139
124
140
#### Docker environment variables and volume options used or can be added:
125
141
126
-
127
-
| Option/Variable | Description |
128
-
|-----------------|-----------------------|
129
-
|`-e REACT_APP_API_URL=`| Sets the API URL. Leave empty or set to the backend URL if hosted externally. Example: `-e REACT_APP_API_URL=http://backendhost:4000`|
130
-
|`-e REACT_APP_DOMAINS='["example.com", "example.org"]'`| Specifies the domains for the email service. Set to desired domains. |
131
-
|`-v ./attachments:/React-TrashMail/mailserver/attachments`| Volume mount for attachments. Maps a local directory to a container directory. |
132
-
|`-v /my/local/mongodb:/data/db`| (Optional) Volume mount for MongoDB data. Maps a local directory to the MongoDB data directory in the container. |
|`-e REACT_APP_API_URL=`| Sets the API URL. Leave empty or set to the backend URL if hosted externally. Example: `-e REACT_APP_API_URL=http://backendhost:4000`|
145
+
|`-e REACT_APP_DOMAINS='["example.com", "example.org"]'`| Specifies the domains for the email service. Set to desired domains. |
146
+
|`-v ./attachments:/React-TrashMail/mailserver/attachments`| Volume mount for attachments. Maps a local directory to a container directory. |
147
+
|`-v /my/local/mongodb:/data/db`| (Optional) Volume mount for MongoDB data. Maps a local directory to the MongoDB data directory in the container. |
133
148
134
149
These options and environment variables are crucial for configuring the TrashMail application within the Docker environment, especially for handling backend API communication and data persistence.
0 commit comments