diff --git a/.gitignore b/.gitignore index 3fe762e..71f2920 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ rental/client_secrets.json token.pickle *.env *.tar -debug.log \ No newline at end of file +debug.log +rental/templates/rental/mails \ No newline at end of file diff --git a/rental/tasks.py b/rental/tasks.py index 9cf0451..a62bd66 100644 --- a/rental/tasks.py +++ b/rental/tasks.py @@ -8,46 +8,38 @@ import os @shared_task -def send_confirmation_mail(name, email, template="ticket"): +def send_confirmation_mail(name, email): # , template="ticket"): """ Send confirmation message to customer """ subject = "Nous avons reçu votre message" - message = f" Merci {name}, Bien reçu nous revenons vers vous rapidement ! - HtmlMessage" - html_path = os.path.join(BASE_DIR, 'rental/templates/rental/html/') - with open(os.path.join(html_path, f"{template}.html"), 'r') as html: - html_message = html.read() - # html_path = os.path.join( - # 'rental/templates/rental/mails/', f"{template}.html") - # context = { - # "name": name, - # "email": email, - # "message": message - # } - # html_message = render(request, html_path, context) + message = f" Merci {name}, Bien reçu nous revenons vers vous rapidement !" + # html_path = os.path.join(BASE_DIR, 'rental/templates/rental/mails/') + # with open(os.path.join(html_path, f"{template}.html"), 'r') as html: + # html_message = html.read() send_mail( subject, message, EMAIL_HOST_USER, - [email], + [email] # , # html_message=html_message.content - html_message=html_message + # html_message=html_message ) @shared_task -def send_notification(subject, name, message, template="activation"): +def send_notification(subject, name, message): # , template="activation"): """ Send notification to admins """ - html_path = os.path.join(BASE_DIR, 'rental/templates/rental/html/') - with open(os.path.join(html_path, f"{template}.html"), 'r') as html: - html_message = html.read() + # html_path = os.path.join(BASE_DIR, 'rental/templates/rental/mails/') + # with open(os.path.join(html_path, f"{template}.html"), 'r') as html: + # html_message = html.read() mail_admins( f"{name} a envoyé un message", - f"Sujet : {subject}\nMessage : {message}", - html_message=html_message + f"Sujet : {subject}\nDe : {name}\nMessage : {message}" # , + # html_message=html_message ) @shared_task def send_quotation(name, email): """ Send quotation to customer """ - send_confirmation_mail(name, email, template="welcome") + send_confirmation_mail(name, email): # , template="welcome") diff --git a/rental/templates/rental/mails/activation.html b/rental/templates/rental/mails/activation.html deleted file mode 100644 index 1d567c8..0000000 --- a/rental/templates/rental/mails/activation.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - -
- -
- - - - -
-
-

Lorem ipsum dolor sit | View online version

-
-
-
- -
-
- -
- - - - - - -
- -
- - - - - - - -
-

-

- -
- - - - - - -
- -
-
-
- -
-
- -
- - - - - - -
- -
- - - - -
- - - - - - -
- -
-
-
- -
-
- -
- - - - - - -
- -
- - - - - - - - - - - - - -
-
-

You're almost there!

-
-
-
-

Hi ((var:name)), Thank you for signing up to PMS. 

-

To confirm your account, simply click on the button below:

-
-
- - - - -
- - Activate My Account - -
-
-
-

If the link doesn’t work, copy this URL into your browser: Var URL

-

Welcome!

-
-
-
- -
-
- -
- - - - - - -
- -
- - - - - - - -
- - - - - -
- - - - -
- - - -
-
- - - - - -
- - - - -
- - - -
-
- - - - - -
- - - - -
- - - -
-
- -
-
-

Page 1   |   Page 2   |   Page 3

-

Click here to unsubscribe.
Created by Mailjet

-
-
-
- -
-
- -
- - - \ No newline at end of file diff --git a/rental/templates/rental/mails/ticket.html b/rental/templates/rental/mails/ticket.html deleted file mode 100644 index 5408644..0000000 --- a/rental/templates/rental/mails/ticket.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - -
- -
- - - - -
-
-

Ce message ne s'affiche pas correctement ? | Voir dans le navigateur

-
-
-
- -
-
- -
- - - - - - -
- -
- - - - - - - -
-

-

- -
- - - - - - -
- -
-
-
- -
-
- -
- - - - - - -
-
- - - - -
- - - - - - -
- -
-
-
-
-
- -
- - - - - - -
- -
- - - - - - - - - - -
-
-

Bonjour ((var:first_name)),
thanks for your email!

-
-
-
-

 

-

We’ve received your contact request, and someone from our team will be in touch soon. In the meantime, our FAQ might help get you an instant answer to your question.

-
-
- - - - -
- - Go to the FAQ - -
-
-
- -
-
- -
- - - - - - -
- -
- - - - - - - -
- - - - - -
- - - - -
- - - -
-
- - - - - -
- - - - -
- - - -
-
- - - - - -
- - - - -
- - - -
-
- -
-
-

Page 1   |   Page 2   |   Page 3

-

Click here to unsubscribe.
Created by Mailjet

-
-
-
- -
-
- -
- - - \ No newline at end of file diff --git a/rental/templates/rental/mails/welcome.html b/rental/templates/rental/mails/welcome.html deleted file mode 100644 index e8afcc6..0000000 --- a/rental/templates/rental/mails/welcome.html +++ /dev/null @@ -1,485 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - -
- -
- - - - -
-
-

Lorem ipsum dolor sit | View online version

-
-
-
- -
-
- -
- - - - - - -
- -
- - - - - - - -
-

-

- -
- - - - - - -
- -
-
-
- -
-
- -
- - - - - - -
- -
- - - - -
- - - - - - -
- -
-
-
- -
-
- -
- - - - - - -
- -
- - - - - - - - - - -
-
-

Welcome ((var:first_name)) ! We are so happy to have you on board.

-
-
-
-

You can now start using ((var:product_name)).

-
-
- - - - -
- - Get Started - -
-
-
- -
-
- -
- - - - - - -
- -
- - - - - - - -
- - - - - -
- - - - -
- - - -
-
- - - - - -
- - - - -
- - - -
-
- - - - - -
- - - - -
- - - -
-
- -
-
-

Page 1   |   Page 2   |   Page 3

-

Click here to unsubscribe.
Created by Mailjet

-
-
-
- -
-
- -
- - - \ No newline at end of file