Sending email problem


When i execute my code i get [message Could not instantiate mail function.]

use \OxidEsales\Eshop\Core\Email;

class AskForPrice extends oxUBase{

public function sendEmail(){
	$oEmail = oxNew(\OxidEsales\Eshop\Core\Email::class);
	$aParams = oxConfig::getRequestParameter('editval');
  		$myConfig = oxRegistry::getConfig();
            $emailTo = oxConfig::getRequestParameter('adminemailto');
            $sName = $aParams['name'];
            $sEmail = $aParams['email'];
            $sSubject = $aParams['subject'];
            $sMessage = $aParams['message'];			


Does anyone know whats the problem or can give me any hint?


Short question: The other OXID original mails can send? So the Question is if you have a global mail problem.


Yes i can send an email from the original contact form from oxid.


Hm with small modifications it works for me.
try this one:
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\Request;

class AskForPrice extends OxidEsales\Eshop\Application\Controller\FrontendController {

If this wont work you can upload your Modul to github or somewhere we can see the code completly :wink: