|
#1
|
|||
|
|||
|
Hi.
I just finished the code to send sms messages when a client send a message from a contact form. I need to tell that this code has absolutelly no garantie that it will work! I know that it works with the Claro celular company, in Brazil. If your cellphone company accepts that you send sms messages thru an e-mail client, then it should work. Ask your cellphone's company if you can send sms thru e-mails, and, if yes, first of all try to send it using your prefered e-mail client. If it works, then you can test use this code. First, you need to inform: 1 - the area code of your phone number; 2 - your phone number; 3 - your company server's address to where the e-mail is sent; 4 - a message subject. Code:
$ddd='00'; $Phone='8842xxxx'; $operadora='yourcompanyadress.com'; $msgSubject='Your message subject'; Code:
$ddd.$Phone.'@'.$operadora /components/com_hotproperty/controller.php is: Code:
$ddd='00';
$Phone='8842xxxx';
$operadora='yourcompanyadress.com';
$msgSubject='Your message subject';
if (strlen($enquiry) > 120 ) $msgBody = substr($enquiry, 1, 120); else $msgBody = $enquiry;
$mail = JFactory::getMailer(); /*I don't know if this is necessary, but I use it again...*/
$mail->setSender( array( $email, $name ) );
$mail->addRecipient($ddd.$Phone.'@'.$operadora);
$mail->setSubject($msgSubject);
$mail->setBody( $contactnumber."\n".$msgBody );
if(!$mail->Send())
{
return JError::raiseError(500, "Faillure sending SMS!");
}
Code:
// Send email
if(!$mail->Send()) {
return JError::raiseError(500, JText::_("Sorry, but an error occured while sending your email"));
}
This is a sugestion to the people at mosets, to make some tests and, if possible, and if it works, maybe to insert this in a new version of hot property. Cheers to all. Sergio Last edited by ssaguiar; 11-20-2008 at 06:47 AM. |
|
#2
|
|||
|
|||
|
Could this be extended so it sends a sms to every listing company automatically, if they have set up their mobile phone number to their listing data correctly too?
So when a prospective buyer send an inquery to one listed property, the real estate agent also have an option to get this alert as a email and optionally also as a sms? Would be nice if the requested data from the inquiry with name, phone number was sent with that sms to him also and as an email and stored to his account db dashboard over sent/received inquiries by sms/emails for a time period You could then charge every agent for sent inquiries.This function can be very much improved and valuable both to the site owner and also for the real estate agents. |
|
#3
|
|||
|
|||
|
Quote:
At this time, when the client send an enquiry from the poperty or from the real estate's agent's contact form or from the company's contact form, I receive the sms because the form routine is the same for all of these. To make it work as you sugest, it's necessary to add a checkbox for ech of the companies and for each of the agents (like 'Receive sms (Y/N)'), and, in the code, if the checkbox is active then send the sms to the agent/company also. This can be done reading the database and, when submiting the form, read all records to see if it needs to send the sms also to the company and/or to the others agents of this company, or something like that. I think that it's somehow not very dificult to implement. Sergio |
|
#4
|
|||
|
|||
|
Have you implement this Sergio? There is a nice comp J 1.5 native that maybe could be used?
http://extensions.joomla.org/extensi...s/3207/details rgds
__________________
Success in the long run Its not about the code its about the people and community that's make it! |
|
#5
|
|||
|
|||
|
Quote:
Sergio |
|
#6
|
|||
|
|||
|
Can You do some custom work for me?
I need this script to be implemented in my site so that agents receive sms on the phone number they left when they registered. Please contact me on dusmanko79@hotmail.com when You have the time. |
|
#7
|
|||
|
|||
|
Take a look at Google Voice.. Free and able to send out SMS..
http://www.google.com/googlevoice/about.html# |
|
#8
|
|||
|
|||
|
Yes very nice but this is not 10% of the work I need,how do I implement this in my site...
|
|
#9
|
|||
|
|||
|
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|