I wanted to use LukeLast's smtp module with version 5.x. Here is what I did to get it working:
CONVERSION OF SMTP.MODULE TO 5.X
1) create directory sites/all/modules
2) create directory sites/all/modules/smtp
3) place smtp.module in sites/all/modules/smtp
4) create the file smtp.info in sites/all/modules/smtp
5) paste the following text into smtp.info
; $Id$
name = SMTP
description = Provides SMTP
6) in smtp.module insert the following just prior to the Settings Hook function:
/**
* smtp_menu
*/
function smtp_menu() {
$items = array();
$items[] = array(
'path' => 'admin/settings/smtp',
'title' => t('SMTP module settings'),
'callback' => 'drupal_get_form',
'callback arguments' => 'smtp_settings',
'access' => user_access('access administration pages'),
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
7) in smtp.module, at the end of smtp_settings function change:
return $form;
to
return system_settings_form($form);
8) in smtp.module replace user_mail() with drupal_mail() in smtp_settings function as follows:
drupal_mail(t('mailkey', $test_address, t('Drupal test email'), t('If you receive this message it means your site is capable of sending email.'), variable_get('site_mail', 'test@example.com'), 'From: ' . variable_get('site_mail', 'test@example.com'));