send an email with picture/rich text format in the body

Discussion in 'Python' started by anya, May 14, 2006.

  1. anya

    anya Guest

    Hey,
    I have a certain problem and till now I didnt find an answer on the
    web.

    I want to send an email message with picture in it. I dont want to put
    it as
    attachment but make it in the body of the mail, so every one who open
    the email will see the picture.. (it is possible that the solution will
    be in any other format that will be opened i.e pdf, doc and I will put
    this in the body )

    Neither in MimeWriter nor using the definition of MymeTypes I was able
    to do it ..

    Does anyone have a solution?

    Thanks
     
    anya, May 14, 2006
    #1
    1. Advertising

  2. anya

    Ben Finney Guest

    "anya" <> writes:

    > I want to send an email message with picture in it.


    Please, reconsider. Email is a text medium.

    > I dont want to put it as attachment but make it in the body of the
    > mail, so every one who open the email will see the picture..


    No, they won't; my email client displays only text, and that's the
    case for a great many people on the net.

    > Does anyone have a solution?


    If you want people to view something other than text, email is not
    what you want. Give a URL to the place where they can view what you
    want them to see; then they can choose a time when they are using a
    graphically capable terminal.

    --
    \ "Why should I care about posterity? What's posterity ever done |
    `\ for me?" -- Groucho Marx |
    _o__) |
    Ben Finney
     
    Ben Finney, May 14, 2006
    #2
    1. Advertising

  3. anya

    Astan Chee Guest

    what about sending the mail as html instead of normal plain/text ?


    anya wrote:

    >Hey,
    >I have a certain problem and till now I didnt find an answer on the
    >web.
    >
    >I want to send an email message with picture in it. I dont want to put
    >it as
    >attachment but make it in the body of the mail, so every one who open
    >the email will see the picture.. (it is possible that the solution will
    >be in any other format that will be opened i.e pdf, doc and I will put
    >this in the body )
    >
    >Neither in MimeWriter nor using the definition of MymeTypes I was able
    >to do it ..
    >
    >Does anyone have a solution?
    >
    >Thanks
    >
    >
    >
     
    Astan Chee, May 14, 2006
    #3
  4. Am Sonntag 14 Mai 2006 13:24 schrieb anya:
    > I want to send an email message with picture in it.


    This...

    > I dont want to put
    > it as
    > attachment but make it in the body of the mail, so every one who open
    > the email will see the picture..


    will...

    > (it is possible that the solution will
    > be in any other format that will be opened i.e pdf, doc and I will put
    > this in the body )


    never...

    > Neither in MimeWriter nor using the definition of MymeTypes I was able
    > to do it ..


    work.

    That is, unless you design your own MIME standard, and get all email clients
    out there to read your type of "structured document," which you inherently
    need for including pictures directly in an email (body), as MIME (as we know
    it today) only knows about stacked message parts, not about message content
    and higher level formatting.

    Basically, to include a picture in a body today, there's concensus that you
    insert a HTML-document into one MIME part, and an <img> link refers to the
    attachment that comes in another MIME part (by the filename, which is the
    same as for the attached MIME part). But, as you see, this specifically
    requires that the recipient is able to view HTML mails (which quite a lot of
    people, even those using M$ Outlook, have turned off by default).

    Anyway, read Ben Finney's response carefully. If you're trying to send out
    commercial email, I'll be the first person to dump your mail if it doesn't at
    least come in a format I can read (and understand!) text-only.

    --- Heiko.
     
    Heiko Wundram, May 14, 2006
    #4
  5. anya

    Miki Guest

    Miki, May 14, 2006
    #5
  6. anya

    Ben Finney Guest

    "Miki" <> writes:

    > See http://docs.python.org/lib/node597.html
    > IMO if you'll place the picture as 1'st MutliMime part the *some* email
    > readers will show it like you want.


    And most good spam filters will recognise it for the junk that it is,
    and flag it appropriately. Messages that contain little plain text get
    flagged as likely spam.

    If there's useful information for the recipient to see in an email,
    put it in as text. If you want to distribute files, put them online
    for fetching -- and then feel free to send an email containing the URL
    to the people who want those files, so they can get them at an
    appropriate time, with appropriate tools.

    --
    \ Contentsofsignaturemaysettleduringshipping. |
    `\ |
    _o__) |
    Ben Finney
     
    Ben Finney, May 14, 2006
    #6
  7. anya

    Ten Guest

    On Sunday 14 May 2006 12:24, anya wrote:
    > Hey,
    > I have a certain problem and till now I didnt find an answer on the
    > web.
    >
    > I want to send an email message with picture in it. I dont want to put
    > it as
    > attachment but make it in the body of the mail, so every one who open
    > the email will see the picture.. (it is possible that the solution will
    > be in any other format that will be opened i.e pdf, doc and I will put
    > this in the body )
    >
    > Neither in MimeWriter nor using the definition of MymeTypes I was able
    > to do it ..
    >
    > Does anyone have a solution?
    >
    > Thanks


    The problem with doing this, programmatically or otherwise, is that however
    you implement it, it's not going to work everywhere.

    You can easily send it, but if you do include binary data in the message body,
    then however you do it most people will be seeing a garbled (and offensive to
    the the eye) message body.

    I think it's not the right thing to do, either, if you ever managed to do this
    it would be by working around how email is supposed to work.

    Eventually, unless you have a userbase that is happy to open things in a
    particular way for you, you'll have to bite the bullet and use more orthodox
    techniques, methinks.

    (he says with an image in his headers)

    Ten

    --
    There are 10 types of people in this world,
    those who understand binary, and those who don't.
     
    Ten, May 14, 2006
    #7
  8. anya wrote:

    > I want to send an email message with picture in it. I dont want to put
    > it as attachment but make it in the body of the mail, so every one who
    > open the email will see the picture..


    Step 1: convert image to ascii art
    Step 2: send
    Step 3: hope recipient uses a fixed-width font

    --
    Edward Elliott
    UC Berkeley School of Law (Boalt Hall)
    complangpython at eddeye dot net
     
    Edward Elliott, May 14, 2006
    #8
  9. anya

    anya Guest

    anya, May 28, 2006
    #9
  10. anya

    Ten Guest

    On Sunday 28 May 2006 07:27, anya wrote:
    > Acctualy there is a solution:
    > see http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473810
    > (thanks darrin massena for sharing)
    >
    > and , if you will set all the neccessary parametrs, it won't be
    > recognized as a
    > spam,
    > thanks


    Ahah - a slightly different thing to what I thought you were after.

    I'd looked at "every one who open the email will see the picture" and
    discounted html mail.

    Glad you got what you wanted done, done.

    Ten.

    --
    There are 10 types of people in this world,
    those who understand binary, and those who don't.
     
    Ten, May 28, 2006
    #10
  11. anya

    Ben Finney Guest

    "anya" <> writes:

    > Acctualy there is a solution:
    > see http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473810


    Again, sending anything but plain text as the message body ensures
    that your message is unreadable to a large number of people using a
    variety of software. It's your choice whether to restrict your
    audience in this way, but know that that's what you're doing.

    If your message is going to be accompanied by a plain text body anyway
    (as advised by the recipe you refer to), that plain text body is either
    sufficient to give the necessary information, or not.

    If the plain text is sufficient, please don't bloat the message with
    the same information in an inefficient, non-standard message body. If
    the plain text is not sufficient to say what you want to say, please
    use a means of distributing it other than email.

    > and , if you will set all the neccessary parametrs, it won't be
    > recognized as a spam,


    For many people, who have trained their spam classifier with the
    majority of spam they receive, the simple fact that it contains HTML
    and images *at all* is enough to classify it as spam.

    --
    \ "Prediction is very difficult, especially of the future." -- |
    `\ Niels Bohr |
    _o__) |
    Ben Finney
     
    Ben Finney, May 29, 2006
    #11
  12. anya

    Max M Guest

    Ben Finney wrote:
    > "anya" <> writes:
    >
    >
    >>Acctualy there is a solution:
    >>see http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473810

    >
    >
    > Again, sending anything but plain text as the message body ensures
    > that your message is unreadable to a large number of people using a
    > variety of software. It's your choice whether to restrict your
    > audience in this way, but know that that's what you're doing.



    90% of users are non-technical users who use standard email readers,
    that can easily read html messages.

    In my experience the kind of user that receives emails with html and
    pictures often prefer it that way.

    So why bother with the lecture? I cannot remember when I have last
    received a relevant email that I could not read in text mode.


    --

    hilsen/regards Max M, Denmark

    http://www.mxm.dk/
    IT's Mad Science

    Phone: +45 66 11 84 94
    Mobile: +45 29 93 42 96
     
    Max M, May 29, 2006
    #12
  13. Max M wrote:
    > 90% of users are non-technical users who use standard email readers,
    > that can easily read html messages.
    >
    > In my experience the kind of user that receives emails with html and
    > pictures often prefer it that way.
    >
    > So why bother with the lecture? I cannot remember when I have last
    > received a relevant email that I could not read in text mode.


    Because
    (A) This _is_ a technical newsgroup with mores you are violating.
    (B) Some of us "technical users" avoid such email/news readers
    precisely because they can cause tracking across the web.

    --
    --Scott David Daniels
     
    Scott David Daniels, May 29, 2006
    #13
  14. anya

    Max M Guest

    Scott David Daniels wrote:
    > Max M wrote:
    >
    >> 90% of users are non-technical users who use standard email readers,
    >> that can easily read html messages.
    >>
    >> In my experience the kind of user that receives emails with html and
    >> pictures often prefer it that way.
    >>
    >> So why bother with the lecture? I cannot remember when I have last
    >> received a relevant email that I could not read in text mode.

    >
    >
    > Because
    > (A) This _is_ a technical newsgroup with mores you are violating.


    *I* am? How? By disagreeing on how technology should be used?


    > (B) Some of us "technical users" avoid such email/news readers
    > precisely because they can cause tracking across the web.


    Yes but some times it's just simpler to send formatted text and images.
    I also use text only email. But I don't believe everybody else has to.


    --

    hilsen/regards Max M, Denmark

    http://www.mxm.dk/
    IT's Mad Science

    Phone: +45 66 11 84 94
    Mobile: +45 29 93 42 96
     
    Max M, May 29, 2006
    #14
  15. anya

    Ten Guest

    On Monday 29 May 2006 11:28, Max M wrote:
    > Ben Finney wrote:
    > > "anya" <> writes:
    > >>Acctualy there is a solution:
    > >>see http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473810

    > >
    > > Again, sending anything but plain text as the message body ensures
    > > that your message is unreadable to a large number of people using a
    > > variety of software. It's your choice whether to restrict your
    > > audience in this way, but know that that's what you're doing.

    >
    > 90% of users are non-technical users who use standard email readers,
    > that can easily read html messages.
    >


    Even if your 90% were any kind of real statistic, 90% of everyone is not
    everyone, and there ends the technical debate.

    100 != 90

    As a matter of interest, I'm almost sure that on checking you'd find
    that of the widely available mail clients, only a minority will display
    such a mail properly without further interaction.

    You might find that platform neutrality and usefulness to people are
    genuine considerations for those with any kind of technical integrity,
    and that "most people use this particular piece of proprietary software
    so let's just say screw the rest" (whilst still benefiting from a
    platform-neutral medium, and bouncing it off open source servers) is
    widely considered a shabby and broken way of working.

    If people want to palm people off with excuses and
    generally implement things in a lazy, badly badly planned, mercenary and
    undisciplined way, they're probably better off spending their time with the
    non-technical management and not amongst programmers.

    Sorry for the rant, good luck to the guy if he's solved his problem,
    but damn, that "90% so let's not bother doing things properly" stuff makes my
    blood boil.

    --
    There are 10 types of people in this world,
    those who understand binary, and those who don't.
     
    Ten, May 29, 2006
    #15
  16. Ten wrote:

    > Sorry for the rant, good luck to the guy if he's solved his problem,
    > but damn, that "90% so let's not bother doing things properly" stuff makes
    > my blood boil.


    You must really hate browsing the web then. :)

    --
    Edward Elliott
    UC Berkeley School of Law (Boalt Hall)
    complangpython at eddeye dot net
     
    Edward Elliott, May 29, 2006
    #16
  17. anya

    Ben Finney Guest

    Max M <> writes:

    > Ben Finney wrote:
    > > "anya" <> writes:
    > >
    > >
    > >>Acctualy there is a solution:
    > >>see http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473810

    > >
    > >
    > > Again, sending anything but plain text as the message body ensures
    > > that your message is unreadable to a large number of people using a
    > > variety of software. It's your choice whether to restrict your
    > > audience in this way, but know that that's what you're doing.

    >
    >
    > 90% of users are non-technical users who use standard email readers,
    > that can easily read html messages.


    Even if your figure of 90% were correct, 10% of readers is still a
    large number for most purposes. It's also unknown exactly *which* 10%
    of your readers that covers.

    > In my experience the kind of user that receives emails with html and
    > pictures often prefer it that way.


    What of those who prefer it not to be that way?

    What of those who are *incapable* of reading a message that way?

    > So why bother with the lecture? I cannot remember when I have last
    > received a relevant email that I could not read in text mode.


    Nice for you. Fortunately, standard message formats allow the internet
    to be used by those other than the enabled majority. Let's keep it
    that way.

    --
    \ "People come up to me and say, 'Emo, do people really come up |
    `\ to you?'" -- Emo Philips |
    _o__) |
    Ben Finney
     
    Ben Finney, May 29, 2006
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer
    Replies:
    2
    Views:
    649
  2. =?Utf-8?B?RGFuaWVs?=

    Rich text format.

    =?Utf-8?B?RGFuaWVs?=, Aug 30, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    679
    Alex D.
    Sep 6, 2005
  3. Dominik
    Replies:
    4
    Views:
    2,453
    Dominik
    Mar 22, 2007
  4. Bill McCarthy
    Replies:
    3
    Views:
    3,542
    Alexey Smirnov
    Jan 23, 2009
  5. Hollow Quincy

    rich:dataTable - rich:dataScroller

    Hollow Quincy, Dec 30, 2011, in forum: Java
    Replies:
    5
    Views:
    4,809
    Arved Sandstrom
    Jan 2, 2012
Loading...

Share This Page