At the current stage the email is fully working, however, when receiving the actual mail the image is not attached, rather is name is displayed. I wold like to display the attachment in order to be able to download it.
def publication(request):
if request.method == "POST":
inputImmagine1 = request.POST['inputImmagine1']
send_mail(
'Richiesta di pubblicazione - Condoglianze', #subject
inputImmagine1, #message
inputEmail, # from email
['XXX@gmail.com'], # to email
)
return render(request, 'publication.html', {'inputImmagine1': inputImmagine1})
else:
return render(request, 'publication.html', {})