Jump to content

using mail function in a module is not validating


Recommended Posts

Hi,
I am doing a small module in Prestashop. In that module I have used mail function for sending email to the admin. It is doing fine. But when I did validate the module using prestashop validator then it showed me an error like 
The use of function mail() is forbidden
. So can someone kindly tell me how to solve this issue? Any help and suggestions will be realy appreciable. Thanks

 

Link to comment
Share on other sites

No no, it's read to use, have a look at the declaration:

 

public static function Send($id_lang, $template, $subject, $template_vars, $to,
$to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null,
$template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null)
  • Like 1
Link to comment
Share on other sites

 

Hi,
I am doing a small module in Prestashop. In that module I have used mail function for sending email to the admin. It is doing fine. But when I did validate the module using prestashop validator then it showed me an error like 
The use of function mail() is forbidden
. So can someone kindly tell me how to solve this issue? Any help and suggestions will be realy appreciable. Thanks

 

 

Hello,

 

I need a module to send email alerts when a new message arrives in customer service. This module would serve what you are doing? Could you send me?

Link to comment
Share on other sites

diegopintovieira, actually when a message is added to the customer service, it should be sent to an email as well, do you need to send it to multiple emails?

 

I need just one, but the option does not send SMTP email alert to this email.

 

Only option php mail function sends alerts, but the message I receive is to observe many errors in the attached image please.

 

Link: http://pt-br.tinypic.com/view.php?pic=8vutn6&s=8#.U8ZljUAhOXk

Edited by diegopintovieira (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...