/** * we don't need to include the api/lists.php file * because the AddToList function in the subscribers api does it already * because it checks the list exists before anything else. */ $lists_api = new Lists_API(); $lists_api->Load($function_params['mailinglist']); $listowneremail = $lists_api->Get('owneremail'); $listownername = $lists_api->Get('ownername'); require_once(IEM_PATH . '/ext/interspire_email/email.php'); $emailapi = new Email_API(); $emailapi->SetSMTP(SENDSTUDIO_SMTP_SERVER, SENDSTUDIO_SMTP_USERNAME, @base64_decode(SENDSTUDIO_SMTP_PASSWORD), SENDSTUDIO_SMTP_PORT); $emailapi->Set('CharSet', SENDSTUDIO_CHARSET); $emailapi->Set('Subject', GetLang('SubscriberNotification_Subject')); $emailapi->Set('FromName', false); $emailapi->Set('FromAddress', $listowneremail); $emailapi->Set('ReplyTo', $function_params['emailaddress']); $emailapi->Set('BounceAddress', SENDSTUDIO_EMAIL_ADDRESS); $emailapi->Set('Subject', sprintf(GetLang('SubscriberNotification_Subject_Lists'), $lists_api->name)); $body = ''; $body .= sprintf(GetLang('SubscriberNotification_Field'), GetLang('EmailAddress'), $function_params['emailaddress']); // no custom fields to process? just return the subscriber id.