- Timestamp:
- Feb 14, 2007, 11:53:04 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/notification_by_mail.php
r1809 r1818 227 227 $is_action_send = ($action == 'send'); 228 228 229 if (!isset($customize_mail_content))230 {231 $customize_mail_content = $conf['nbm_complementary_mail_content'];232 }233 234 229 // disabled and null mail_address are not selected in the list 235 230 $data_users = get_user_notifications('send', $check_key_list); … … 244 239 { 245 240 $datas = array(); 241 242 if (!isset($customize_mail_content)) 243 { 244 $customize_mail_content = $conf['nbm_complementary_mail_content']; 245 } 246 247 if ($conf['nbm_send_html_mail'] and !(strpos($customize_mail_content, '<') === 0)) 248 { 249 // On HTML mail, detects if the content are HTML format. 250 // If it's plain text format, convert content to readable HTML 251 $customize_mail_content = nl2br(htmlentities($customize_mail_content)); 252 } 246 253 247 254 // Prepare message after change language -
trunk/include/functions_mail.inc.php
r1809 r1818 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | 6 // | Copyright (C) 2006 Ruben ARNAUD - team@phpwebgallery.net|6 // | Copyright (C) 2006-2007 Ruben ARNAUD - team@phpwebgallery.net | 7 7 // +-----------------------------------------------------------------------+ 8 8 // | branch : BSF (Best So Far) … … 27 27 // +-----------------------------------------------------------------------+ 28 28 29 /**30 * - Extract mail fonctions of password.php31 * - Modify pwg_mail (add pararameters + news fonctionnalities)32 * - Var conf_mail, function get_mail_configuration, format_email, pwg_mail33 */34 35 29 // +-----------------------------------------------------------------------+ 36 30 // | functions | … … 100 94 101 95 /** 102 * Return an completed array template/theme96 * Returns an completed array template/theme 103 97 * completed with $conf['default_template'] 104 98 * … … 162 156 163 157 /** 158 * Returns email of all administrator 159 * 160 * @return string 161 */ 162 function get_administrators_email() 163 { 164 global $conf; 165 166 $result = array(); 167 168 $query = ' 169 select 170 U.'.$conf['user_fields']['username'].' as username, 171 U.'.$conf['user_fields']['email'].' as mail_address 172 from 173 '.USERS_TABLE.' as U, 174 '.USER_INFOS_TABLE.' as I 175 where 176 I.user_id = U.'.$conf['user_fields']['id'].' and 177 I.status in (\'webmaster\', \'admin\') and 178 '.$conf['user_fields']['email'].' is not null 179 order by 180 username 181 '; 182 183 $datas = pwg_query($query); 184 if (!empty($datas)) 185 { 186 while ($admin = mysql_fetch_array($datas)) 187 { 188 if (!empty($admin['mail_address'])) 189 { 190 array_push($result, format_email($admin['username'], $admin['mail_address'])); 191 } 192 } 193 } 194 195 return $result; 196 } 197 198 /** 164 199 * sends an email, using PhpWebGallery specific informations 165 200 * … … 168 203 * - args: function params of mail function: 169 204 * o from: sender [default value webmaster email] 205 * o Cc: array of carbon copy receivers of the mail. [default value empty] 206 * o Bcc: array of blind carbon copy receivers of the mail. [default value empty] 170 207 * o subject [default value 'PhpWebGallery'] 171 208 * o content: content of mail [default value ''] … … 175 212 * o theme: template to use [default $conf['default_template']] 176 213 */ 177 //function pwg_mail($to, $from = '', $subject = 'PhpWebGallery', $infos = '', $infos_format = 'text/plain', $email_format = null)178 214 function pwg_mail($to, $args = array()) 179 215 { … … 223 259 } 224 260 261 if ($conf_mail['send_bcc_mail_webmaster']) 262 { 263 $args['Bcc'][] = $conf_mail['formated_email_webmaster']; 264 } 265 225 266 if (($args['content_format'] == 'text/html') and ($args['email_format'] == 'text/plain')) 226 267 { … … 233 274 $headers = 'From: '.$args['from']."\n"; 234 275 $headers.= 'Reply-To: '.$args['from']."\n"; 276 277 if (!empty($args['Cc'])) 278 { 279 $headers.= 'Cc: '.implode(',', $args['Cc'])."\n"; 280 } 281 282 if (!empty($args['Bcc'])) 283 { 284 $headers.= 'Bcc: '.implode(',', $args['Bcc'])."\n"; 285 } 286 235 287 $headers.= 'Content-Type: multipart/alternative;'."\n"; 236 288 $headers.= ' boundary="---='.$conf_mail['boundary_key'].'";'."\n"; 237 289 $headers.= ' reply-type=original'."\n"; 238 290 $headers.= 'MIME-Version: 1.0'."\n"; 239 240 if ($conf_mail['send_bcc_mail_webmaster'])241 {242 $headers.= 'Bcc: '.$conf_mail['formated_email_webmaster']."\n";243 }244 291 245 292 $content = ''; -
trunk/include/picture_comment.inc.php
r1809 r1818 210 210 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 211 211 212 $val_url = get_absolute_root_url().'comments.php?validate='.$comm['id']; 212 213 $del_url = get_absolute_root_url().'comments.php?delete='.$comm['id']; 213 214 … … 217 218 .'IP: '.$comm['ip']."\n" 218 219 .'Browser: '.$comm['agent']."\n\n" 220 .'Validate: '.$val_url."\n" 219 221 .'Delete: '.$del_url."\n"; 220 222 if ($comment_action!='validate') … … 224 226 .'comments.php?validate='.$comm['id']; 225 227 } 226 pwg_mail(get_webmaster_mail_address(), 227 array('subject' => 'PWG comment by '.$comm['author'], 'content' => $content)); 228 pwg_mail 229 ( 230 format_email('administrators', get_webmaster_mail_address()), 231 array 232 ( 233 'subject' => 'PWG comment by '.$comm['author'], 234 'content' => $content, 235 'Bcc' => get_administrators_email() 236 ) 237 ); 228 238 } 229 239 } -
trunk/register.php
r1809 r1818 71 71 .l10n('admin').': '.$admin_url; 72 72 73 pwg_mail(get_webmaster_mail_address(), 73 pwg_mail 74 ( 75 format_email('administrators', get_webmaster_mail_address()), 74 76 array 75 77 ( 76 78 'subject' => 'PWG '.l10n('register_title').' '.$username, 77 'content' => $content 79 'content' => $content, 80 'Bcc' => get_administrators_email() 78 81 ) 79 82 );
Note: See TracChangeset
for help on using the changeset viewer.