Actions

API15

JUtility/sendAdminMail

From Joomla! Documentation

< API15:JUtility
Revision as of 13:58, 12 May 2013 by JoomlaWikiBot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Sends mail to administrator for approval of a user submission

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

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 $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/utilities/utility.php

Importing

jimport( 'joomla.utilities.utility' );

Source Body

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";
 
        // Get a JMail instance
        $mail =& JFactory::getMailer();
        $mail->addRecipient($adminEmail);
        $mail->setSubject($subject);
        $mail->setBody($message);
 
        return  $mail->Send();
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />