Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- subject = "Ticket n° " + str(post.id) + " : " + str(post.Objet.encode('utf-8'))
- 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"))
- image = post.Image
- mail = EmailMessage(subject, message, 'support@datasystems.fr', ['support@datasystems.fr'], html_message='This is <b>HTML</b> Content')
- mail.attach_file(image.path)
- mail.send()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement