This is a python lib to send mail. The mail can be generated by a llm with ollama or you can write it.
You'll need:
- linux (ubuntu works perfectly)
- an email (gmail, it's only work on gmail for the moment)
- application password (can be create in the gmail account)
- python (works on 3.12.3)
pip install lau-project-mailfrom lau-project-mail import Mail
variable = Mail(prompt, model)
# ....mail = Mail(prompt, model)
mail.set_context(prompt, subject)
mail.set_sender(sender, password)
mail.set_recipient(recipient)
mail.generate()mail = Mail(prompt, model)
mail.set_sender(sender, password)
mail.set_recipient(recipient)
mail.set_subject(subject)
mail.set_body(body)The mail can be send, but after the preview, you want to edit the mail (body and/or subject)
mail = Mail(prompt, model)
# ... generated or wrote
mail.set_subject(subject)
mail.set_body(body)You'll need:
- prompt: the prompt for the llm
- model: the model of the llm
variable = Mail(prompt, model)You'll need:
- recipient: the email to send the mail
variable.set_recipient(recipient)You'll need:
- sender: the email to send the mail
- password: the application password
variable.set_sender(sender, password)You'll need:
- context: approximatly the idea for the body
- mail_subject: approximatly the idea for the subject
variable.set_context(context, mail_subject)You'll need:
- use the set method to give to the variable the informations to generate the mail
variable.generate()You'll need:
- use the genate method or use the set_subject and set_body methods if you don't want to generate
variable.preview()You'll need:
- use the genate method or use the set_subject and set_body methods if you don't want to generate
variable.send()You'll need:
- body: the body of the mail
variable.set_body(body)You'll need:
- subject: the subject of the mail
variable.set_subject(subject)