11-21-2016, 04:54 PM
I'm guessing your system is pretty closed to where it's not a big deal for people to be able to email anyone else in the system.
If you want the email to come from the person who sent the email (as opposed to the system) I would expect a good bit of your emails to go to spam initially. If you want to set some sort of reply-to address in there, you might be able to get by a little better.
The file users/email_test.php has pretty much everything you need to send an email.
So, if you notice, that when you are viewing someone's profile, the page looks like....profile.php?id=2
I've already done the query for you on the profile.php page to get all the info on the user whose profile you're viewing, so
$thatUser->email is the email of the person you're sending to
and
$user->data()->email is the user you're sending from.
If you want the email to come from the person who sent the email (as opposed to the system) I would expect a good bit of your emails to go to spam initially. If you want to set some sort of reply-to address in there, you might be able to get by a little better.
The file users/email_test.php has pretty much everything you need to send an email.
So, if you notice, that when you are viewing someone's profile, the page looks like....profile.php?id=2
I've already done the query for you on the profile.php page to get all the info on the user whose profile you're viewing, so
$thatUser->email is the email of the person you're sending to
and
$user->data()->email is the user you're sending from.