JMail/sendAdminMail
From Joomla! Documentation
< API16:JMail
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Sends mail to administrator for approval of a user submission
Template:Description:JMail/sendAdminMail
Syntax[edit]
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[edit]
boolean True on success
Defined in[edit]
libraries/joomla/mail/mail.php
Importing[edit]
jimport( 'joomla.mail.mail' );
Source Body[edit]
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();
}
[Edit See Also] Template:SeeAlso:JMail/sendAdminMail
Examples[edit]
<CodeExamplesForm />