Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.030 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'attribute': 0.07; 'subject:Problem': 0.09; 'subject:image': 0.09; 'binary': 0.13; 'this:': 0.15; '"test"': 0.16; 'subject:mime': 0.16; 'subject:sending': 0.16; 'converted': 0.18; 'skip:m 30': 0.24; 'code': 0.25; 'import': 0.27; 'somebody': 0.27; 'message- id:@mail.gmail.com': 0.28; 'problem': 0.29; 'error': 0.30; 'message.': 0.33; 'to:addr:python-list': 0.33; 'question,': 0.34; 'received:209.85.212': 0.34; '???': 0.34; 'but': 0.37; 'received:google.com': 0.37; 'could': 0.37; 'received:209.85': 0.38; 'put': 0.38; 'subject:with': 0.38; 'why': 0.39; 'help': 0.39; 'received:209': 0.39; 'to:addr:python.org': 0.40; 'subject': 0.62; 'everybody': 0.63; 'here': 0.64; 'mime': 0.67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=QrZ0Mv7ZX04nwaPcJbJNmDLZsMexH+P0bxszI8VNrUg=; b=m/FYMwI+fi/OV1lY37+/y1X3H9h7RLfFhuxu+1TfxAV2SnxHBJVpc1gyMEF5QDY9Ws brwCOlHMhDVuBexlA/5qnSK8E5orcU1omcy0Tn2FXR2GWnKuPe+HTDo90GbwVAIRXbfe EtjTncNq71Ru4Znr6AMFJTOkC/oC5VGmNWxnA= MIME-Version: 1.0 Date: Wed, 1 Feb 2012 16:24:25 -0500 Subject: Problem sending an email in html with mime image From: Ariel To: python-list@python.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1328131467 news.xs4all.nl 6961 [2001:888:2000:d::a6]:33479 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19740 Hi everybody I have a question, here is my problem I want to send an email with content in html with an image embed so I converted the image binary in mime text and then I put the mime code inside the src attribute of the html like this: Then I send the email, here is my code: from django.template.loader import render_to_string from django.core.mail.message import EmailMultiAlternatives contextcopy = {} message = render_to_string('bulletin.html', contextcopy) subject = "TEST" msg = EmailMultiAlternatives(subject, message, from_email,['myemail@gmail.com'']) msg.attach_alternative(message, "text/html") msg.send() The problem is that if I don't put the image mime code inside the src the email is sent but when I put the code then the email is not send and I don't get any error message. Could somebody please, help me ??? Why the email is not send when I put the mime code of the image in the html ??? Regards, Ariel