watchdog('mail',t('%name-from sent an e-mail at %form.',array('%name-from'=>theme('placeholder',$edit['name']." <$from>"),'%form'=>url($_GET['q'],NULL,NULL,TRUE))));
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:
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.
return'node/'.$node->nid;
$form_state['redirect']='node/'.$node->nid;
}
/**
* Implementation of hook_mail()
*/
functionemail_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']),$language->language);