function mimemail_post in Mime Mail 5
Same name and namespace in other branches
- 6 includes/mimemail.incoming.inc \mimemail_post()
- 7 includes/mimemail.incoming.inc \mimemail_post()
Receive messages POSTed from an external source.
This function enables messages to be sent via POST or some other RFC822 source input (e.g. directly from a mail server).
Return value
The POSTed message.
1 string reference to 'mimemail_post'
- mimemail_menu in ./
mimemail.module - Implementation of hook_menu()
File
- ./
mimemail.module, line 381 - Component module for sending Mime-encoded emails.
Code
function mimemail_post() {
$message = $_POST['message'];
$token = $_POST['token'];
$hash = md5(variable_get('mimemail_key', '**') . $message);
if ($hash != $token) {
watchdog('access denied', t('Authentication error for POST e-mail'), WATCHDOG_WARNING);
return drupal_access_denied();
}
return mimemail_incoming($message);
}