Played a bit with "From" and "Reply-To" email headers. Used easy-forms to send different kinds of email.
1. For FAQ. Nice regular expression to check email
/^[\.\-_A-Za-z0-9]+?@[\.\-A-Za-z0-9]+?\.[A-Za-z0-9]{2,6}$/
2. To set correct "from" field, use something like this in before_submit hook:
$from = $thisuser['email'] ? $thisuser['email'] : $qo[16];
if field exist, then result taken from there, if not - from used profile.
NOTE. It's better to set $from = $thisuser['email'] just before hook. That eliminates additional actions, when form available only to requisteres users.
|