If it will add a weblog entry, I’d go with that. If not- did a quickie extension. Works in a quick test and you should be able to modify as needed. Just save it as ext.saef_mail.php, upload to extensions, enable- and it should email just before the weblog data are entered. It’s simple, so you should spot how to tweak it.
<?php
class Saef_mail
{
var $settings = array();
var $name = 'SAEF Mail Confirmation';
var $version = '1.0.0';
var $description = 'Emails confirmation after SAEF submission';
var $settings_exist = 'n';
var $docs_url = ''; //'http://expressionengine.com';
// -------------------------------
// Constructor - Extensions use this for settings
// -------------------------------
function Saef_mail($settings='')
{
$this->settings = $settings;
}
// END
// -------------------------------
// Send the mail
// -------------------------------
function do_mailing()
{
global $SESS, $REGX, $PREFS;
if ( ! class_exists('EEmail'))
{
require PATH_CORE.'core.email'.EXT;
}
$from = $PREFS->ini('webmaster_email');
$send_to = $SESS->userdata('email');
$mssg = 'Your signup has been processed';
$subject = 'Email confirmation';
$email = new EEmail;
$email = new EEmail;
$email->wordwrap = true;
$email->mailtype = 'text';
$email->from($from);
$email->reply_to($from);
$email->to($send_to);
$email->subject($subject);
$email->message($REGX->entities_to_ascii($mssg));
$email->Send();
return;
}
// --------------------------------
// Activate Extension
// --------------------------------
function activate_extension()
{
global $DB;
$DB->query($DB->insert_string('exp_extensions',
array(
'extension_id' => '',
'class' => "Saef_mail",
'method' => "do_mailing",
'hook' => "weblog_standalone_insert_entry",
'settings' => "",
'priority' => 10,
'version' => $this->version,
'enabled' => "y"
)
)
);
}
// END
// --------------------------------
// Disable Extension
// --------------------------------
function disable_extension()
{
global $DB;
$DB->query("DELETE FROM exp_extensions WHERE class = 'Saef_mail'");
}
// END
}
// END CLASS
?>