Hi,
doing this by email would be a redundant step. Independently of method you have to write some custom script. If you can program your form to send POST/GET request (server side, or browser side AJAX - doesn't matter), then you could write some simple script that will get data, check contacts and add new one if it doesn't exist.
Script template
// get data from POST or GET and sanitize it.
... die if something is wrong
// load EPESI
define('CID', false);
define('READ_ONLY_SESSION',true);
require_once('../../../include.php');
ModuleManager::load_modules();
$user_id = 1; // id of a user that will be an author of a record. Maybe create a new user to handle this. "1" is the user created during installation.
Base_AclCommon::set_user($user_id);
// check for contact
$rs = new RBO_RecordsetAccessor('contact');
$crits = array('first_name' => $fname, 'last_name' => $lname ... ); // use data obtained at the top of the script.
$records = $rs->get_records($crits);
if (count($records) == 0) {
$data = array (...); // format data to add. It may be different than crits, or it may be the same.
$rs->new_record($data);
}
// maybe return some info about success or not.
This is a simple script and assuming that you're not the target of DoS attacks it should be ok. But please be aware that any person can create a bunch of records and mess your database. You should check for valid emails, send an email, use staging table, then add a user after a validation.
Regards,
Adam