Created
May 24, 2013 05:11
-
-
Save Verurteilt/5641383 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pdf(request): | |
response = HttpResponse(content_type="application/pdf") | |
response['Content-Disposition'] = 'attachment; filename="UTEL_Tramites.pdf"' | |
file_ = GenerarPDF(response=response, user=User.objects.get(id=1)) | |
to_admin = 'mini.guero@hotmail.com' | |
html_content = "Informacion recibida de <br><br><br>***Mensaje****<br><br>" | |
msg = EmailMessage('Correo de Contacto', html_content, 'from@server.com', [to_admin]) | |
msg.attach('UTEL_Tramites.pdf', response.content, 'application/pdf') | |
msg.send() | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment