watchdog('mail',t('%name-from sent an e-mail at %form.',array('%name-from'=>theme('placeholder',$form_state['values']['name']." <$from>"),'%form'=>url($_GET['q'],array('absolute'=>TRUE)))));
// Update user:
watchdog('mail',t('%name-from sent an e-mail at %form.',array('%name-from'=>$form_state['values']['name'],'%form'=>url($_GET['q'],array('absolute'=>TRUE)))));
drupal_set_message(t('Your message has been sent.'));
// Jump to home page rather than back to contact page to avoid contradictory messages if flood control has been activated.
$form_state['redirect']='node/'.$node->nid;
$form_state['redirect']=$path;
}
/**
...
...
@@ -346,20 +369,17 @@ function email_mail($key, &$message, $params) {
$language=$message['language'];
switch($key){
case'contact':
$node=$params['node'];
// Compose the body:
$msg[]=t('@name sent a message using the contact form at @node.',array('@name'=>$params['name'],'@node'=>$params['url']),array('langcode'=>$language->language));
$msg[]=$params['message'];
// Tidy up the body:
foreach($msgas$index_key=>$value){
$msg[$index_key]=wordwrap($value);
}
// Prepare the body:
$message['body']=implode("\n\n",$msg);
$message['body'][]=t('@name sent a message using the contact form at @url.',array('@name'=>$params['name'],'@url'=>$params['url']),array('langcode'=>$language->language));