Idea: Iconic representation of Sender ( Kmail + patches )

Idea: Iconic representation of Sender ( Kmail + patches )

Post by Andrew Gra » Sat, 03 Apr 1999 04:00:00



I'm sure somebody else must have already thought of this, but here
goes..

How about an Email standard that allows an iconic representation of the
sender of a message to be displayed when the message is read ?
This could be either a true Icon or a thumbnail type image of the
sender.

With the plethora of GUI mail readers around this would be an obvious
and relatively simple concept to implement. One could simply build on
the
existing MIME standards to do this. The picture would simply be attached
to
the message as a Mime/image type, and 'icon-aware' mail readers would
recognise a 'X-icon-attached' header to extract and display it.
Non-aware
readers would just ignore the unrecognised header and treat the icon as
just another mime attachment....

Had this idea whilst using the 'kmail' reader of KDE ( Linux based
GUI ).
Instead of the KDE Logo in the message reading window a little icon
display
a little picture of the sender - using the mail address as a unique key.

In order to demostrate the idea I've coded up the simpler aspect  ( the
image display ) into KMAIL - cdiffs attached.  This is a very simple
concept-only demo,  which relies on the images already being available
on the Reader's local machine.  I've not tackled the MIME side yet.

Does this simple but  visually pleasing idea appeal to anyone other than
me ?

Comments invited...

--

Scimitar Consultants                    phone: +44 118 935 3543
Reading
United Kingdom

[ kmail1.1_icon_changes.cdiff 4K ]
        Kmail patch - Iconic representation of Sender

              A.gray 30 March 1999

How about an Email standard that allows an iconic representation of the
sender of a message to be displayed when the message is read ?
This could be either a true Icon or a thumbnail type image of the sender.

In order to demostrate the idea I've coded up the simpler aspect  ( the
image display ) into KMAIL.  This is a very simple concept-only demo,
which relies on the images already being available on the mail reader's
local machine.

In anyone needs an executable just send me a mail...

cdiff installation instructions
===============================

Code base is KDE1.1. Save attachment, then;
 cd <kdesource>/kdenetwork-1.1/kmail
 patch < patchfilename
 make

[ you don't need to run configure or 'make depend' again ]

Using the new kmail
===================
Icons (gif,jpg,xbm) are searched for in $HOME/.kde/share/apps/kmail/pics.
Ideally these should be 100x100, though no checking is currently done.

Thus in order to display an image of yours trully, the file

Would need to exist in the above directory

----

Scimitar Consultants                    phone: +44 118 935 3543
Reading
United Kingdom

*** kmail/kmreaderwin.h Sun Mar 28 19:37:44 1999
--- kmail/kmreaderwin.h.new     Sun Mar 28 19:40:10 1999
***************
*** 68,73 ****
--- 68,75 ----
    /** Return selected text */
    QString copyText();

+   QString iconFromAddr(const QString);                /** ARG 280399 **/
+
    /** Get/set auto-delete msg flag. */
    bool autoDelete(void) const { return mAutoDelete; }
    void setAutoDelete(bool f) { mAutoDelete=f; }
*** kmail/kmreaderwin.cpp       Sun Mar 28 19:37:44 1999
--- kmail/kmreaderwin.cpp.new   Sun Mar 28 19:40:10 1999
***************
*** 331,338 ****
      break;

    case HdrFancy:
!     mViewer->write(QString("<TABLE><TR><TD><IMG SRC=") + mPicsDir +
!                  "kdelogo.xpm></TD><TD HSPACE=50><B><FONT SIZE=+2>");
      mViewer->write(strToHtml(mMsg->subject()) + "</FONT></B><BR>");
      mViewer->write(i18n("From: ")+
                   KMMessage::emailAddrAsAnchor(mMsg->from(),FALSE) + "<BR>\n");
--- 331,338 ----
      break;

    case HdrFancy:
!     mViewer->write(QString("<TABLE><TR><TD><IMG SRC=") +  iconFromAddr(mMsg->from()) +
!                  "></TD><TD HSPACE=50><B><FONT SIZE=+2>");
      mViewer->write(strToHtml(mMsg->subject()) + "</FONT></B><BR>");
      mViewer->write(i18n("From: ")+
                   KMMessage::emailAddrAsAnchor(mMsg->from(),FALSE) + "<BR>\n");
***************
*** 1057,1061 ****
--- 1057,1110 ----
  }

+ /* iconFromAddr   method attempts to locate a icon representing the
+                 author of a message - using from address
+                 A.Gray 28 MAR 99
+ */
+
+ QString KMReaderWin::iconFromAddr(const QString addr)   /** ARG 280399 **/
+
+ {
+    QString toStr = addr,defaultimg,fname;
+    const int NIMGTYPES = 3;
+    QString imgtypes[NIMGTYPES] = { "jpg","gif","xpm" };
+    QString picdir = "/share/apps/kmail/pics/";
+    int i;
+
+    // Strip mail address down to bear bones

+      toStr = toStr.right(toStr.size() - i - 2);
+      if (( i = toStr.find(">")) != -1 )
+        toStr = toStr.left(i);
+    }
+    
+
+    if((i = toStr.find(" ")) != -1) {
+      toStr = toStr.left(i);
+    }
+    
+    // Search for imagefile associated with address
+    // Default is the KDE logo file.
+    QString basedir = kapp->localkdedir() + picdir;
+    defaultimg = mPicsDir + "kdelogo.xpm";
+
+    for (i=0;i<NIMGTYPES;i++)
+    {
+      fname = basedir+toStr+"."+imgtypes[i];
+      QFile picfile(fname);
+      if ( picfile.open(IO_ReadOnly)) {
+        cout << "iconFromAddr: *Found" << fname << endl;
+        picfile.close();
+        return(fname);
+
+      } else {
+        cout << "iconFromAddr: " << fname << " not found " << endl;
+      }
+    }
+
+     return defaultimg;
+ }
+
  //-----------------------------------------------------------------------------
  #include "kmreaderwin.moc"
+

 
 
 

Idea: Iconic representation of Sender ( Kmail + patches )

Post by Rene' W » Sat, 03 Apr 1999 04:00:00



> I'm sure somebody else must have already thought of this, but here
> goes..

> How about an Email standard that allows an iconic representation of the
> sender of a message to be displayed when the message is read ?
> This could be either a true Icon or a thumbnail type image of the
> sender.

Yes, somebody thought of this about 10 years ago, and it's called "faces".  Most
E-Mail clients support them (you'll have to add an "X-Face:" header line), like
xmail, exmh, or xfmail.

Ren

 
 
 

Idea: Iconic representation of Sender ( Kmail + patches )

Post by Zeni » Sat, 03 Apr 1999 04:00:00



        >snip<
: Yes, somebody thought of this about 10 years ago, and it's called "faces".
: Most E-Mail clients support them (you'll have to add an "X-Face:" header
: line), like xmail, exmh, or xfmail.

        Got a URL or RFC number?

--

        Yah, Emacs is a good OS, but I prefer FreeBSD.

 
 
 

Idea: Iconic representation of Sender ( Kmail + patches )

Post by Rene' W » Sun, 04 Apr 1999 04:00:00




>         >snip<
> : Yes, somebody thought of this about 10 years ago, and it's called "faces".
> : Most E-Mail clients support them (you'll have to add an "X-Face:" header
> : line), like xmail, exmh, or xfmail.

>         Got a URL or RFC number?

Hmm, this stuff is *so* old, I've been using it long before there was a WWW.
But try these for a start:
        http://www.cs.indiana.edu/ftp/faces/
        http://www.beedub.com/exmh/exmh-faq.html#6
        http://www.cs.su.oz.au/~piers/python/facemail.html

Cheers, Ren

 
 
 

Idea: Iconic representation of Sender ( Kmail + patches )

Post by Phil McRev » Tue, 06 Apr 1999 04:00:00




Quote:>[posted & mailed]

<FLAME>
What a stupid idea.  Why are you wasting bandwidth?  The original
poster didn't ask for replies by email, and now you're sending
duplicate copies all over the net.

Further, you are only confusing the original poster because it is very
likely they will see your private reply in email before they see your
post in the newsgroup.  Now they have no idea if you're commenting
privately to them or attempting to continue a public discussion.

Please desist from this wasteful and moronic habit and simply engage
your brain in a useful and constructive manner when replying to
someone's post.
</FLAME>


>: How about an Email standard that allows an iconic representation of the
>: sender of a message to be displayed when the message is read ? This could
>: be either a true Icon or a thumbnail type image of the sender.

>    Sounds great.

Its called "faces", and its been around since a USENIX conference
about 10 years ago.

Quote:>    Why send the same icon with each and ever message you send out?

Because you might update the icon, etc., and keeping everything
together with a message allows archival copies of a message to retain
the face associated with the message without having to go on an easter
egg hunt.

Quote:>    This isn't a 4 line .sig, this is a *huge* piece of data when
>    multiplied by every message ever sent.

We're talking about an *icon* here, not a 1280x1024 24-bit image.
Furthermore, the faces implementation restricts the icon to a
grayscale image of certain pixel dimensions and uuencodes this data
(yeah, it predates MIME) into a header line.  The resulting X-Face:
line consists of about 4 lines of text.  This is comparable to a
signature file.

Quote:>    Anything that uselessly increases total Internet bandwidth is a bad
>    idea.

Like posting and mailing usenet articles?
--
http://www.veryComputer.com/~legalize Legalize *hood!

``Ain't it funny that they all fire the pistol,     <URL: http://
  at the wrong end of the race?''--PDBT     www.eden.com/~thewho>
 
 
 

1. KMail - configuring the message list fields KMail

Each time, I open up KMail, the fields in the "Message List"  appear in the
order "Subject", "Sender", "Date".

I prefer, the fields of the "Message List" to appear "Date", "Sender", and
"Subject".  I can do this manually but the next time I start up KMail, the
field show up with the default order.

I did not find any option in the Configure->Appearance.  Is there a way to
set this permanently (that is perhaps not documented)?

TIA
--
Arun Khan

2. 3c905b problems

3. PATCH - kmail - custom logo in fancy headers

4. Etherexpress on Compaq Presario CDS742

5. How to make NON-iconic when minimized?

6. NIS+ Secure RPC Password

7. Iconic when not desired

8. GhostScript compilation/linking problem

9. Starting a program in an iconic nxterm window?

10. Gnome and iconic

11. How to start dtfile iconic ?

12. Forcing Infoexplorer iconic with resources?

13. DES/IDEA loopback patches for 2.1.x