action_function = 'add_email_signature_phpmailer_callbackaction'; // Get the body $body = ($mobj->ContentType == "text/plain") ? $mobj->Body : $mobj->AltBody; // Add our signature if (!preg_match("/^-- /",$body)) $body .= "\n-- \n".$sig; // Store the new body if ($mobj->ContentType == "text/plain") { $mobj->Body = $body; } else { $mobj->AltBody = $body; } }