Jump to content

Order alert emails not arriving due to subject


Cote Clic

Recommended Posts

Hello,

with the email alert module, not all new order emails arrive depending on the SMTP server used. The cause is the subject of the email which is "#number of order". 

I have replace code in "/modules/ps_emailalerts/ps_emailalerts.php".

Original code

Mail::send(
                    $mail_id_lang,
                    'new_order',
                    $this->trans(
                        'New order : #%d - %s',
                        [
                            $order->id,
                            $order->reference,
                        ],
                        'Emails.Subject',
                        $locale),
                    $template_vars,
                    $merchant_mail,
                    null,
                    $configuration['PS_SHOP_EMAIL'],
                    $configuration['PS_SHOP_NAME'],
                    null,
                    null,
                    $dir_mail,
                    false,
                    $id_shop
                );

Modified code

Mail::send(
                    $mail_id_lang,
                    'new_order',
                    'New order',
                    $template_vars,
                    $merchant_mail,
                    null,
                    $configuration['PS_SHOP_EMAIL'],
                    $configuration['PS_SHOP_NAME'],
                    null,
                    null,
                    $dir_mail,
                    false,
                    $id_shop
                );

and no more problems.

Who had the idea to remove the sending of email with "mail" php ??? !!!! Really a bad idea... Sendmail cannot be used on most shared hosting...so you have to use SMTP...

 

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...