• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Passing variables to admin email

Passing variables to admin email 11 years 3 months ago #26149

  • jdstarz
  • jdstarz's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Ok, here's my situation. I am using Joomla 2.5, and the latest RSfrom pro r48. I created a newsletter subscriber form. I have a php script which converts some numbers or codes into strings, or text. This is information pulled from another database. I would like to pass some of these variables into my admin email. To be clear. This is not form data.

Is there a way to do this? I am already familiar with the quick add method for form values.
The administrator has disabled public write access.

Passing variables to admin email 11 years 3 months ago #26150

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
There is also a PHP Email script section that you can use:

http://www.rsjoomla.com/support/documentation/view-article/610-php-email-scripts.html
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Passing variables to admin email 11 years 3 months ago #26152

  • jdstarz
  • jdstarz's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hey Alex!

Thanks for your quick reply. Your great advice ensued with the following code. I hope it helps others.

// Prepare the database connection
$db = JFactory::getDbo();
 
// Set up Variable
$my_value = $_POST['form']['value']['0'];
 
// Retrieve Name From Table
$db->setQuery("SELECT * FROM #__your_table WHERE id = " . $my_value);
$result = $db->loadObject();
 
 // Set New Variables
  $my_id = $result->id;
  $my_name =  $result->name;
 
  $modAdminEmailText .= '<p><b>My New Name: ' . $my_name . '</b></p>'; 
$adminEmail['text'] .= $modAdminEmailText;
The administrator has disabled public write access.

Passing variables to admin email 11 years 2 months ago #26815

  • josh.thomson
  • josh.thomson's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 2
Oops, see post below
Last Edit: 11 years 2 months ago by josh.thomson.
The administrator has disabled public write access.

Passing variables to admin email 11 years 2 months ago #26816

  • josh.thomson
  • josh.thomson's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 2
I wonder if you can help me with my encoding issues?


I need to pass the variables to the admin emails, but need them encoded so that eg: ' ' (spaces) get encoded into: '%20' so that the parser can automatically hyperlink the URL correctly.


Thanks

www.rsjoomla.com/forum/37-rsform-pro/236...utput-for-a-url.html
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!