How to tackle with EMAIL_NOT_SENT error in Joomla 1.5
first: go to > default.php in \components\com_mailto\views\mailto\tmpl\ change redirect index.php to custommail.php
<form action="<?php echo JURI::base() ?>custommail.php" name="mailtoForm" method="post">
second: create new file in Joomla root , Name it as custommail.php , Insert following code in that file:
<?php ########### Search for Joomla Website ############ #Created By – Prasad Wagholikar #
#Purpose – custom mail send script to send article link to friend #
#Joomla 1.5.8 , Mail Icon , mail ‘article link’ to a friend , mail function is not working , hence this is a custom script developed to send mail to friend ,The mail form is in \components\com_mailto\views\mailto\tmpl\default.php , Previously it was submited to index.php , But because of known bug in mail , The form action is changed to customMail.php to send mail through this custom script. ####################################################### $headers = ‘MIME-Version: 1.0′ . “\r\n”; $headers .= ‘Content-type: text/html; charset=iso-8859-1′ . “\r\n”;
$customMailTo=$_REQUEST; $customMailFrom=$_REQUEST; $customSubject=$_REQUEST; $customSender=$_REQUEST; $articlelink=$_REQUEST; $mailForm = ‘Mail from : ‘.$customSender.’ <’.$customMailFrom.’>’; $message=’<html><body><span><p><b>’.$customSender.’</b> has sent you the link <a href=’.$articlelink.’ >’.$articlelink.’</a></p></span></body></html>’; $sentMail=mail($customMailTo,$mailForm , $message, $headers); if($sentMail) { ?> <h5> The article link has been sent successfully</h5>
<?php } else { ?> <h5> EMAIL_NOT_SENT </h5>
<?php } ?>
<div style=”text-align:right”> <a href=”javascript: void window.close()”> Close <img src=”/components/com_mailto/assets/close-x.png” border=”0″ alt=”" title=”" /> </a> </div>