cancel
Showing results for 
Search instead for 
Did you mean: 

Send E-Mail after order (third party payment)

Send E-Mail after order (third party payment)

After I have enabled and configured a third party payment module the mail that send tracking infos and order infos stopped working (I don't know if it was working before). I've found some code online but it didn't work. 

I'm not able to download this plugin: Magento 2 Order Confirmation Email Extension by MageComp so I can't try it

4 REPLIES 4

Re: Send E-Mail after order (third party payment)

Hello @agostino_vagni 

 

If you think you are not sure if email were triggering before you you can disable that payment module and try with another payment method for order purchase.

You can check logs if any error is there, the logs are here :

var/logs/

Make sure you have SMTP or any any other mail server provider setup.

 

Hope it helps !

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Send E-Mail after order (third party payment)

Hi @gaurav_harsh1 

I've tried with the "bank transfer" payment and the email doesn't work. In the log there are no errors regarding the email.

debug.log

[2020-09-23 14:30:16] main.CRITICAL: Class Plazathemes\Recentproductslider\Block\Products does not exist [] []
[2020-09-23 14:30:16] main.CRITICAL: Invalid block type: Plazathemes\Recentproductslider\Block\Products [] []

also with this:

use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER); $obj = $bootstrap->getObjectManager();

$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$objectManager = Magento\Framework\App\ObjectManager::getInstance();
$transportBuilder = $objectManager->create("Magento\Framework\Mail\Template\TransportBuilder");
$transport = $transportBuilder->setTemplateIdentifier($templateId)
    ->setTemplateOptions(['area' => Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $storeId])
            ->setTemplateVars($templateParams)
    ->setFrom(array('email' => 'dummymail@mail.com', 'name' => 'SenderName'))
            ->addTo($receiverMail, "RecaiverName")
    ->setReplyTo('replyto@email.com');
    $transport = $transport->getTransport();

it works and I actually recieve the mail.

The default mail() method returns true but the mail doesn't arrive in my inbox

Re: Send E-Mail after order (third party payment)

@agostino_vagni 

 

are you getting other emails apart from these two emails of tracking no. and order confirmation ?

if Yes, can you please change your mail templates to default for once from admin :

Store > Configuration > Sales > Sales Email

if it works then it's issue with your email templates.

 

Hope it works with default email !

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Send E-Mail after order (third party payment)

Ashampoo_Snap_mercoledì 23 settembre 2020_17h12m42s_001_.pngThat's my configuration (see screenshot above), I don't receive anything. And also with the code that i sent you before i receive this email:

Ashampoo_Snap_mercoledì 23 settembre 2020_17h15m23s_002_.png