Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

javidizadi/EmailScheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Email Scheduler

a Web Application written in Asp .Net Core Web API for back-end and ReactJs for front-end

It can schedule your emails for any time!

How does work

Back-end

Quartz .Net is an enterprice timer library for .Net Standard Framework. I used it in this project for scheduling emails with cron expression.

I Used EF Core and Sqlite for storing schedules in server. "ScheduleLoader" Hosted Service gets uncompleted schedules from database and reschedules them when server booted up.

Front-end

I used tailwindcss and daisyui for user interface components.

In this project i used Axios for communications with Web API. "http-client" handles authentication, "AccountManager" service handles login and signup and change password. "ScheduleManager" service created for manage schedules and CRUD actions for schedules.

Diagram

Here is a simple diagram of scheduling an email

GitHub Light GitHub Dark

Links

Back-end Repo : EmailScheduler-WebApi

Front-end Repo : EmailScheduler-Frontend

daisyUI Repo : daisyui

How to Run Project

Back-end

First you should set this parameters for config project using run dotnet user-secret set ["key"] "value" in root of project

dotnet user-secrets set ["SMTP:Host"] "<your mail server IP or URL>"
dotnet user-secrets set ["SMTP:Port"] "<your mail server Port>"
dotnet user-secrets set ["SMTP:Username"] "<your Username in mail server>"
dotnet user-secrets set ["SMTP:Password"] "<your Password in mail server>"
dotnet user-secrets set ["SMTP:From"] "<your Full Email Address in mail server>"

dotnet user-secrets set ["JWT:Secret"] "<Your JWT Secret Key>"

you should set cors-policy address that it is your website address ( Front-end )

now you can run web application using dotnet run -c=Release and enjoy it.

find this lines in Program.cs file :

app.UseCors(p =>
{
    p.AllowAnyHeader();
    p.WithMethods("GET", "POST", "PUT", "DELETE");
    p.WithOrigins("your_website_URL");
});

Front-end

first you should set backend address at /src/Services/http-client , find this line:

this.client = axios.create({baseURL: "your_backend_address"});

and you can build it with commands :

yarn
yarn build

and copy content of /dist folder at your static host wwwroot and enjoy it!

About

a website for scheduling your emails

Resources

Stars

Watchers

Forks