Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 1.57 KB

README.md

File metadata and controls

65 lines (51 loc) · 1.57 KB

Despoina 🔮

Despoina, the goddess of Mysteries. daughter of Demeter and Poseidon

Introduction

This is a rust code to send each student's grade privately using lettre to send emails from rust and csv to deal with CSV file of grades and students' names.

Send Grades

As you can see in you should have a sheet like this (if your column names are different feel free to change them in code):

id = "شماره دانشجویی"
name = "نام"
email = "ایمیل"
grade = 100
mistake = "توضیحات"
<html>
  <body dir="rtl">
    <p>
      با سلام<br />
      دانشجوی عزیز {{ name }}<br />
      نمره تمرین شما
    </p>
  </body>
</html>

This is a tera template, and you have variables that is set for each student. Please note that you can check the emails before actually sending them with --dry-run flag.

Enter SMTP/Email Address

Enter your SMTP config and subject in config file.

smtp:
  server: smtp.gmail.com
  username: example@gmail.com
  password: secret
email:
  subject: test

Note that if you use Gmail you must go to your Google account and change Less secure app access here by turning on Allow less secure apps. Otherwise, you need to use application-specific passwords.

Installation

You just need to install rust using rustup.

cp conf.yml.example conf.yml
cargo run -- -c ./conf.yml -f ./results.csv