Changeset 2451 for branches/2.0
- Timestamp:
- 04/07/10 16:22:03 (14 years ago)
- Location:
- branches/2.0/expressoMail1_2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/expressoMail1_2/inc/class.imap_functions.inc.php
r2428 r2451 1157 1157 // E-mail address in the text should create a new e-mail on ExpressoMail 1158 1158 $pattern = '/( |<|<|>)([A-Za-z0-9\.~?\/_=#\-]*@[A-Za-z0-9\.~?\/_=#\-]*)( |>|>|<)/im'; 1159 $replacement = '$1<a href=" javascript:new_message_to(\'$2\')">$2</a>$3';1159 $replacement = '$1<a href="mailto:$2">$2</a>$3'; 1160 1160 $body = preg_replace( $pattern, $replacement, $body ); 1161 1162 // If there is an link with a "mailto:" in href attribute, it will changed to create a new e-mail on ExpressoMail.1163 $pattern = '/<a[^>]+href=["\']mailto:([^"]+)["\'][^>]*>([^<]+)<\/a>/im';1164 $replacement = '<a href="javascript:new_message_to(\'$1\')">$2</a>';1165 $body = preg_replace( $pattern, $replacement, $body );1166 1167 1161 1168 1162 return $body; … … 1727 1721 return "The server denied your request to send a mail, you cannot use this mail address."; 1728 1722 } 1729 1730 //new_message_to backs to mailto: pattern1731 $params['body'] = eregi_replace("<a href=\"javascript:new_message_to\('([^>]+)'\)\">[^>]+</a>","<a href='mailto:\\1'>\\1</a>",$params['body']);1732 1723 1733 1724 $toaddress = implode(',',$db->getAddrs(explode(',',$params['input_to']))); -
branches/2.0/expressoMail1_2/js/draw_api.js
r2445 r2451 1769 1769 newBody = newBody.replace("<BODY","<span"); 1770 1770 div.innerHTML+= "<span id='body_"+ID+"'>"+newBody+"</span><br><br>"; 1771 function mailto( link ) 1772 { 1773 var mail = link.href.substr( 7 ); 1774 link.onclick = function( ) 1775 { 1776 new_message_to( mail ); 1777 return false; 1778 }; 1779 } 1780 var links = div.getElementsByTagName( 'a' ); 1781 for ( var i = 0; i < links.length; i++ ) 1782 if ( links.item( i ).href.indexOf( 'mailto:' ) === 0 ) 1783 mailto( links.item( i ) ); 1771 1784 ////////////////////////////////////////////////////////////////////////////////////////////////////// 1772 1785 //Make the thumbs of the message.
Note: See TracChangeset
for help on using the changeset viewer.