<?xml version="1.0"?>
<record><wiki id="wiki?page_id=16">
	<page_name>sendRegistrationActivationEmail</page_name>
	<page_id>16</page_id>
	<page_title>sendRegistrationActivationEmail</page_title>
	<content>==sendRegistrationActivationEmail() Hook==

A hook that can be implemented in the [[Application Delegate Class]] or the [[Table Delegate Class]] to override the sending of an activation email to the user.

===Signature===

function sendRegistrationActivationEmail( Dataface_Record &amp;$record, string $activationURL ) : mixed

====Parameters====

{| class=&quot;listing listing2&quot;
! Name
! Description
|-
| &amp;$record
| A Dataface_Record object encapsulating the record that is being inserted in the users table for this registration.
|-
| $activationURL
| The URL where the user can go to activate their account.
|-
| returns
| Mixed. If this method returns a PEAR_Error object, then registration will fail with an error.
|}

===Example===

&lt;code&gt;
&lt;?php
class conf_ApplicationDelegate {

    function sendRegistrationActivationEmail(&amp;$record, $activationURL){
        // mail the admin to let him know that the registration is occurring.
        $username = $record-&gt;val(&apos;username&apos;);
        $email = $record-&gt;val(&apos;email&apos;);
        
        mail($email, &apos;Welcome to the team&apos;, 
            &apos;Welcome &apos;.$record-&gt;val(&apos;username&apos;).
            &apos;.  You have been successfully registered.  
             Please visit &apos;.$activationURL.&apos; to activate your account&apos;
        );
    }
}
&lt;/code&gt;

===See Also===
* [[beforeRegister]]
* [[afterRegister]]
* [[validateRegistrationForm]]
* [[getRegistrationActivationEmailInfo]]
* [[getRegistrationActivationEmailSubject]]
* [[getRegistrationActivationEmailMessage]]
* [[getRegistrationActivationEmailParameters]]
* [[getRegistrationActivationEmailHeaders]]</content>
	<keywords></keywords>
	<language>en</language>
	<original_page>0</original_page>
</wiki></record>