I made "Leave a message" form send email using the same code that handles our contact form page. This means that since our contact form already send email, I can use the same code for the "Leave a message" form.
I made a copy of docontact.php and saved it under mibew directory (i.e the same location as leavemessage.php),
webim/I went to
leavemessage.tpl from syle/default/template/ (under my mibew settings from admin dashboard, i chose default )
I changed the form action under leavemessage.tpl
from ${mibewroot}/leavemessage.php to ${mibewroot}/docontact.php (remember, docontac.php is the php page that handles our website's contact form submission)
I ensured that the names of the form fields in leavemessage.tpl
matched the name of the posted form fields in the docontact.php
e.g in leavemessage.tpl, name field=name, email field = email, message field=message
in docontact.php, name=$_POST['name'], email=$_POST['email'], message=$_POST['message']
Very happy with the result. Hope this helps someone like other mibew tips helped me