Forums

Send user information via mail

Wziuuu 01 Oct, 2014
Hi guys

I have terrible problem for me, Yes im new with this its my first project with chronoforms and joomla.
I create form what looks like exam and i want to send user information to me (name, email and if its possible hour when he start and end exam).
First i try send user information by dynamic email. I create custom code in setup on submit where i want to get user information code (code below) below and i use user name/email in dynamic from name/email, Nothing happened i received only exam text without information.
<?php
$user =& JFactory::getUser();
$form->data['user_email'] = $user->email;
$form->data['user_id'] = $user->id;
$form->data['user_name'] = $user->name;
?>
Idk what to do now, my head is empty. Im know i dont do something and i dont do something right, but i cant help self.

Please help me with solve this.

Regards
Wojciech
GreyHead 01 Oct, 2014
Answer
Hi Wojciech,

I strongly recommend that you do *not* use the Dynamic From Email element in your Email Setups. Using this often results in your emails being marked as spam and dropped into a spam filter. Instead use the static From Email with an address that matches the site domain name and use Dynamic ReplyTo Email for the user email. The result is the same but with a much better chance of good delivery.

I don't understand what information is missing from the Email??

If you are getting the Exam results but not the User name, then add {user_name} to the Email template where you want it to show.

Bob
Wziuuu 01 Oct, 2014
Thanks a lot its work. First time when i do this i had disable enable encryption, but while you Bob say its correct way i just look more in options.
Again thanks Bob its realy help me.

Regards
Wojciech
This topic is locked and no more replies can be posted.