diff --git a/UI/Contacts/UIxContactView.m b/UI/Contacts/UIxContactView.m
index 9b901efff..cc6f525f3 100644
--- a/UI/Contacts/UIxContactView.m
+++ b/UI/Contacts/UIxContactView.m
@@ -89,8 +89,8 @@
email = [card preferredEMail];
if ([email length] > 0)
mailTo = [NSString stringWithFormat: @""
- @"%@", email, email];
+ @" onclick=\"return openMailTo('%@ <%@>');\">"
+ @"%@", email, [card fn], email, email];
else
mailTo = nil;
@@ -121,8 +121,8 @@
if ([email caseInsensitiveCompare: [card preferredEMail]] != NSOrderedSame)
mailTo = [NSString stringWithFormat: @""
- @"%@", email, email];
+ @" onclick=\"return openMailTo('%@ <%@>');\">"
+ @"%@", email, [card fn], email, email];
}
[emails release];
diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js
index 4c8a4171a..6f5147185 100644
--- a/UI/WebServerResources/ContactsUI.js
+++ b/UI/WebServerResources/ContactsUI.js
@@ -504,10 +504,6 @@ function onConfirmContactSelection(event) {
preventDefault(event);
}
-function onContactMailTo(node) {
- return openMailTo(node.innerHTML);
-}
-
function refreshContacts(contactId) {
refreshCurrentFolder();
cachedContacts[currentAddressBook + "/" + contactId] = null;