Hi,
I have created the addition custom field "osm_ref_email" and located the code (see below) where this needs to go but am unsure how to add this to the code

.
Are you able to advise correct insertion of code to get additional email to be sent?
Thanks
/**
* Send email to subscriber to inform them that their membership approved (and activated)
* @param object $row
*/
public static function sendMembershipApprovedEmail($row)
{
$jconfig = new JConfig();
$db = JFactory::getDbo();
$mailer = JFactory::getMailer();
$config = self::getConfig();
if ($config->from_name)
$fromName = $config->from_name;
else
$fromName = $jconfig->fromname;
if ($config->from_email)
{
$fromEmail = $config->from_email;
}
else
{
$fromEmail = $jconfig->mailfrom;
}
$message = self::getMessages();
$fieldSuffix = self::getFieldSuffix($row->language);
$sql = "SELECT *, title " . $fieldSuffix . " AS title FROM #__osmembership_plans WHERE id=" . $row->plan_id;
$db->setQuery($sql);
$plan = $db->loadObject();