Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. subject = "Ticket n° " + str(post.id) + " : " + str(post.Objet.encode('utf-8'))
  2. message = "Bonjour Datasystems, n n Vous avez un nouveau ticket en attente comportant les informations suivantes : n " + "Nom : " + str(post.Nom.encode('utf-8')) + " n Prénom : " + str(post.Prenom.encode('utf-8')) + " n Société/Association client : " + str(request.user.last_name.encode("utf-8")) + " n N° Téléphone : " + str(post.Telephone.encode("utf-8")) + " n Adresse Email : " + str(post.Mail.encode("utf-8")) + " n Description du problème : " + str(post.Description.encode("utf-8"))
  3. image = post.Image
  4.  
  5. mail = EmailMessage(subject, message, 'support@datasystems.fr', ['support@datasystems.fr'], html_message='This is <b>HTML</b> Content')
  6. mail.attach_file(image.path)
  7. mail.send()
  8.  
  9. Bonjour Datasystems,
  10. Vous avez un nouveau ticket ... (currently)
  11.  
  12. ---
  13.  
  14. Bonjour Datasystems,
  15.  
  16. Vous avez un nouveau ticket ... (What I would like to get)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement