Changeset 2452
- Timestamp:
- 04/07/10 16:24:00 (14 years ago)
- Location:
- branches/2.1/expressoMail1_2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1/expressoMail1_2/inc/class.imap_functions.inc.php
r2415 r2452 1225 1225 // E-mail address in the text should create a new e-mail on ExpressoMail 1226 1226 $pattern = '/( |<|<|>)([A-Za-z0-9\.~?\/_=#\-]*@[A-Za-z0-9\.~?\/_=#\-]*)( |>|>|<)/im'; 1227 $replacement = '$1<a href="javascript:new_message_to(\'$2\')">$2</a>$3'; 1228 $body = preg_replace( $pattern, $replacement, $body ); 1229 1230 // If there is an link with a "mailto:" in href attribute, it will changed to create a new e-mail on ExpressoMail. 1231 $pattern = '/<a[^>]+href=["\']mailto:([^"]+)["\'][^>]*>([^<]+)<\/a>/im'; 1232 $replacement = '<a href="javascript:new_message_to(\'$1\')">$2</a>'; 1227 $replacement = '$1<a href="mailto:$2">$2</a>$3'; 1233 1228 $body = preg_replace( $pattern, $replacement, $body ); 1234 1229 … … 1858 1853 return "The server denied your request to send a mail, you cannot use this mail address."; 1859 1854 } 1860 1861 //new_message_to backs to mailto: pattern1862 $params['body'] = eregi_replace("<a href=\"javascript:new_message_to\('([^>]+)'\)\">[^>]+</a>","<a href='mailto:\\1'>\\1</a>",$params['body']);1863 1855 1864 1856 $toaddress = implode(',',$db->getAddrs(explode(',',$params['input_to']))); -
branches/2.1/expressoMail1_2/js/draw_api.js
r2447 r2452 1872 1872 newBody = newBody.replace("<BODY","<span"); 1873 1873 div.innerHTML+= "<span id='body_"+ID+"'>"+newBody+"</span><br><br>"; 1874 function mailto( link ) 1875 { 1876 var mail = link.href.substr( 7 ); 1877 link.onclick = function( ) 1878 { 1879 new_message_to( mail ); 1880 return false; 1881 }; 1882 } 1883 var links = div.getElementsByTagName( 'a' ); 1884 for ( var i = 0; i < links.length; i++ ) 1885 if ( links.item( i ).href.indexOf( 'mailto:' ) === 0 ) 1886 mailto( links.item( i ) ); 1874 1887 ////////////////////////////////////////////////////////////////////////////////////////////////////// 1875 1888 //Make the thumbs of the message.
Note: See TracChangeset
for help on using the changeset viewer.