2 Replies - 320 Views - Last Post: 22 February 2013 - 11:12 PM Rate Topic: -----

#1 Madhouse  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 22-February 13

Missing Data in notice mail

Posted 22 February 2013 - 07:07 AM

I use a programme called evntix for joomla 2.5. The e-mail that gets sent to admin after someone submits an event does not work as expected. The Name and Description data entries come through on the e-mail, but from the $address_event to the $entrance_price_event the data does not show in the mail. The language displays correct, just the data is missing in the mail form.

I ahve tried several solutions and have verified that these fields do exist in the database. I am pulling out my hair.




	function send_mail_to_admin($name_event,$description_event,$name_user,$published,$address_event,$start_date,$end_date,$start_hour,$entrance_price_event )
	{
		$db = &JFactory::getDBO();
		$params = JComponentHelper::getParams ('com_eventix');
		
		$sender   = $params->get('sender_mail','eventix@informafix.fr');
		$reply      = $sender;
		$mailhtml=
			"<html><body>
			<div style=\"background:#3B5998;color:white;padding:10px;font-size:24px;font-weight:bold;\">".JText::_( 'TITLE_MAIL' )."</div>
			<div style=\"background:#EDEFF4;padding:10px;border-bottom:1px solid #D8DFEA;color:#203360;font-size:13px;font-weight:bold;\">".$name_user.' '.JText::_( 'CONTENT_MAIL' )."</div>
			<div style=\"padding:20px;width:700px;margin-left:50px;\">
			<p><b>".JText::_( 'NAME_EVENT' )." :</b>
			<br />
			<br />
			".$name_event."

<p><b>".JText::_( 'CITY_EVENT' )." :</b>
			<br />
			<br />
			".$address_event."

<p><b>".JText::_( 'FROM' )." :</b>
			<br />
			<br />
			".$start_date."

<p><b>".JText::_( 'TO' )." :</b>
			<br />
			<br />
			".$end_date."

<p><b>".JText::_( 'TIME_OF_DAY' )." :</b>
			<br />
			<br />
			".$start_hour."


<p><b>".JText::_( 'ENTRANCE_PRICE_EVENT' )." :</b>
			<br />
			<br />
			".$entrance_price_event."


<p><b>".JText::_( 'DESCRIPTION_EVENT' )." :</b>
			<br />
			<br />
			".$description_event."
			</p>";
		
		if($published)
			{
			$mailhtml.="<p style=\"font-style:italic;padding:10px;color:blue;\">".JText::_( 'EVENT_AUTO_PUBLISHED' )."</p>";
			}
		else
			{
			$mailhtml.="<p style=\"font-style:italic;padding:10px;color:blue;\">".JText::_( 'EVENT_NOT_YET_PUBLISHED' )."</p>";
			}
			 
		$mailhtml.="</div></body></html>


Is This A Good Question/Topic? 0
  • +

Replies To: Missing Data in notice mail

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,991
  • Joined: 08-June 10

Re: Missing Data in notice mail

Posted 22 February 2013 - 04:33 PM

Assuming that the missing code at the bottom of the file is just a copy/paste error, I can't see anything wrong with that code. If the $address_event to $entrance_price_event parameters are being set correctly by the calling code, the function should include those values in the end result.

Have you printed the values, just to see what they are? For instance, by putting a var_dump($address_event); right at the top of the function call? That will tell you if the data is actually being set correctly. If it isn't you need to look at the code that calls the function, not the function itself.
Was This Post Helpful? 1
  • +
  • -

#3 Madhouse  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 22-February 13

Re: Missing Data in notice mail

Posted 22 February 2013 - 11:12 PM

Thank you. I knew I was missing something. The parameters in the calling code was was not set correctly. Whoaaaa!

This post has been edited by GunnerInc: 23 February 2013 - 12:12 AM
Reason for edit:: Quote be gone

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1