API16

JUtility/sendMail

From Joomla! Documentation

< API16:JUtility
Revision as of 17:56, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Mail function (uses phpMailer) <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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]

Mail function (uses phpMailer)

[Edit Descripton]

Template:Description:JUtility/sendMail

Syntax[edit]

static sendMail($from, $fromname, $recipient, $subject, $body, $mode=0, $cc=null, $bcc=null, $attachment=null, $replyto=null, $replytoname=null)
Parameter Name Default Value Description
$from $from From e-mail address
$fromname $fromname From name
$recipient $recipient Recipient e-mail address(es)
$subject $subject E-mail subject
$body $body Message body
$mode 0 $mode false = plain text, true = HTML
$cc null $cc CC e-mail address(es)
$bcc null $bcc BCC e-mail address(es)
$attachment null $attachment Attachment file name(s)
$replyto null $replyto Reply to email address(es)
$replytoname null $replytoname Reply to name(s)

Returns[edit]

boolean True on success

Defined in[edit]

libraries/joomla/utilities/utility.php

Importing[edit]

jimport( 'joomla.utilities.utility' );

Source Body[edit]

public static function sendMail($from, $fromname, $recipient, $subject, $body, $mode=0, $cc=null, $bcc=null, $attachment=null, $replyto=null, $replytoname=null)
{
        // Get a JMail instance
        $mail = &JFactory::getMailer();

        return $mail->sendMail($from, $fromname, $recipient, $subject, $body, $mode, $cc,
                $bcc, $attachment, $replyto, $replytoname);
}

[Edit See Also] Template:SeeAlso:JUtility/sendMail

Examples[edit]

<CodeExamplesForm />