How to use contact module of Drupal 7? I want to use drupal 7 core module for contact.
I want to use it as block so that I can add a contact form to the right sidebar of your website which should be shown at every page. or render it anywhere in the page
I saw this on drupal site and tried to use it.

&lt;?php
print drupal_get_form('contact_mail_page');
?&gt;


It is showing me this

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'contact_mail_page' not found or invalid function name in drupal_retrieve_form() (line 841


So any suggestion how I can use this.
use this code

&lt;?php
if(!function_exists('contact_site_page')) {
  require_once drupal_get_path('module', 'contact').'/contact.pages.inc';
  $output = drupal_get_form('contact_site_form');
  print drupal_render($output);
}
?&gt;


and put print drupal_render($output); where ever you want to put the contact form.

as another solution you can also assign a region for where you want the contact form to be then place the form in there.