2

I'm new in python. I'm sending some big text mail through python.What I'm doing is that I'm storing that big text mail in one single string and sending that. When I'm printing that string at my side I'm getting well formatted as per my desire but on receiver side format of message getting changed.How can I ensure that tabular format of my message sud not get changed. When I print message I get sumthing like this:

Click Count for all 24 hrs:
===================
      Citrus_click      Hadoop_click              Diff
          10224172                 0          10224172

Billed Count for all 24 hrs:
===================
       Citrus Leaf            Hadoop              Diff
           8055239                 0           8055239

Beacon Count for all 24 hrs:
================
       Citrus Leaf            Hadoop              Diff
            900476                 0            900476

Beacon unique Count for all 24 hrs:
===================
       Citrus Leaf            Hadoop              Diff
             43516                 0             43516

But format changed at recievers side and they get sumthing like this:

Click Count for all 24 hrs:
===================
      Citrus_click      Hadoop_click              Diff
             10224172         0              10224172

Billed Count for all 24 hrs:
===================
       Citrus Leaf            Hadoop              Diff
           8055239              0            8055239

Beacon Count for all 24 hrs:
================
       Citrus Leaf            Hadoop              Diff
         900476                 0                   900476

Beacon unique Count for all 24 hrs:
===================
       Citrus Leaf            Hadoop              Diff
          43516                 0                   43516
2
  • Is the receiving side using a variable-width font? If so, try explicitly setting a font in your mail, or changing the mail program's setting to use a monospaced font for plaintext messages. Commented Mar 2, 2013 at 12:07
  • Can u please tell me how can I set font in my mail or can u elaborate more to give more detailed insights....as I told u i'm newbie in python..;) Commented Mar 2, 2013 at 12:37

1 Answer 1

1

This was a comment, but now it's an answer!

Is the receiving side using a variable-width font? If so, try explicitly setting a font in your mail, or changing the mail program's setting to use a monospaced font for plaintext messages.

If you want to force monospace formatting, try making your message body be HTML like this:

<html><body><pre>
your stuff goes here
</pre></body></html>

The pre tag is the important bit: it tells the client program that the text is already formatted as monospace, so it should be displayed like that.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.