·조회수 55

Development and review of disposable email services

Project Introduction

Disposable email is used when you don't want to give out your email address. It can also be used to protect your email from spam when signing up for unreliable sites. I discovered this service when I needed many emails for testing. It was burdensome to create multiple Gmail accounts for testing because they were disposable emails. With this service, I could easily sign up and verify emails through email, and boldly switch to a new email when no longer needed.

Reason for Starting

I chose a disposable email service for my personal project because it has low maintenance burden. The technical structure of email has not changed for decades, and I don't think there will be major changes in the future. Once created, it can be steadily monetized without maintenance burden, so I judged it as a suitable topic for a personal project.

Production Process

  1. When searching for disposable email services on Google, you can see that there are many services available. Since it is a common service, I thought there would be a guide written by someone. I found the guide How To Setup Your Own Disposable Email Server written by Oren Geva, a developer of AHEM server.

  2. The open-source AHEM (Ad-Hoc-Email-Server) server created by the author of the guide is a mail server made with node.js. I followed the guide to set up the mail server on AWS Lightsail and confirmed its normal operation using the SMTP Test Tool.

  3. I purchased a domain to use for the mail server. Since disposable email services only use email for a short period, changing the domain every year is not a problem. Therefore, I purchased a domain that can be used for 1 year at 500 won each with a discount. After 1 year, I will have to pay 49,000 won to renew one, but I don't plan to renew it in the first place.

  4. Since I needed to connect the domain address to the mail server, I set the DNS information for the domain. I wanted to connect the MX record directly to the server address, but since the MX record does not allow IP addresses, I inserted mail.redmail.shop in between. This way, the MX record points to mail.redmail.shop, and this address points to the server address 15.165.14.244. After registering, half a day later, emails were successfully forwarded to the mail server from Gmail.

  5. I needed to create an API to connect the mail server with the front end. The good thing about AHEM server is that, as you can see from the Github readme file, the API is already created. So, connecting the mail server completed the backend construction.

  6. Finally, I finished development by building the web with Next.js. Since the initial setup was templated and the design library was automatically connected, development was completed quickly.

Technologies Used

  • Web: Next.js, Typescript, TailwindCSS
  • Localization: next-i18next (translation), Translation text management using Google Sheets
  • Deployment: Automatic deployment through Vercel
  • Backend: Open-source AHEM server on AWS Lightsail
  • DB: MongoDB

Good Things

  • It was good to be able to quickly finish building the backend using open source. When I looked at the code for the mail server, which had seemed difficult, it was simpler than I thought, so I thought I could build it myself next time.
  • I think the choice of topic was good. The development difficulty is low, but the maintenance burden is low, so I want to find more projects of this size.

Failures Encountered

  • CORS was not handled in the AHEM server, so I had to modify the code. I referred to cptkuk91's Node.js Basic CORS Problem Solution.
  • In Linux, ports up to 1024 require administrator privileges to use. Since the SMTP port I used was 25, I ran the mail server service with administrator privileges.
  • AHEM server is a project that was created a long time ago. Therefore, it does not work on the latest Node.js. I proceeded by installing Node.js 10.x version.
  • To save costs, I used AWS Lightsail instead of AWS EC2. Lightsail is half the price by default, and you can use it for free for the first 3 months. However, it is difficult to connect Lightsail to other AWS services, so I had to set up HTTPS certificates through Let's Encrypt myself. Although Let's Encrypt is free, it has the disadvantage of needing to be renewed every 90 days. I planned to set up automatic renewal in the future and completed it.

Closing

It is good because it is a case of using open source appropriately. I didn't have to reinvent the wheel, and I was able to finish development in just 3 days by using the already created wheel well. So far, I have only used the web for the front end, but now I want to try making an app. Since the server is already set up, I think I can make the app faster. You can check the service at https://tmpmail.danver.io.

References

김지식
김지식
웹, 앱 개발자입니다.

댓글

댓글을 불러오는 중...