API16:JMail/sendAdminMail
From Joomla! Documentation
Description
Sends mail to administrator for approval of a user submission
Syntax
sendAdminMail($adminName, $adminEmail, $email, $type, $title, $author, $url=null)
| Parameter Name | Default Value | Description |
|---|---|---|
| $adminName | $adminName Name of administrator | |
| $adminEmail | $adminEmail Email address of administrator | |
| $email [NOT USED TODO: Deprecate?] | ||
| $type | $type Type of item to approve | |
| $title | $title Title of item to approve | |
| $author | $author Author of item to approve | |
| $url | null |
Returns
boolean True on success
Defined in
libraries/joomla/mail/mail.php
Importing
jimport( 'joomla.mail.mail' );
Source Body
public function sendAdminMail($adminName, $adminEmail, $email, $type, $title, $author, $url = null)
{
$subject = JText::_('USER_SUBMITTED') ." '". $type ."'";
$message = sprintf (JText::_('MAIL_MSG_ADMIN'), $adminName, $type, $title, $author,
$url, $url, 'administrator', $type);
$message .= JText::_('MAIL_MSG') ."\n";
$this->addRecipient($adminEmail);
$this->setSubject($subject);
$this->setBody($message);
return $this->Send();
}
Examples
Code Examples