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"
+