New answers tagged

0

Simply you can use below code to send order email $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $order = $objectManager->create('\Magento\Sales\Model\Order')->load($orderId); $order->setCanSendNewEmailFlag(true); $order->save(); $session->setForceOrderMailSentOnSuccess(true); $emailSender = $objectManager->...


0

For everyone who may stumble about weird error messsages like: "Emails rejected: 554-Reject due to policy restrictions" Try searching for errors in more obvious places instead of making complex SPF-Entries, checking blacklists or looking for helo / ehlo entries to be perfect. In my case the sender-name of the email contains a ":" - ...


0

Custom SMTP is only used for your localhost’s SMTP. If you want to use Google SMTP, select Google in the Email connection. Here's a screenshot. Select Google Apps or Gmail. That's the first option before Custom SMTP.


0

For Magento above 2.3.x: {{var store.formatted_address|raw}} So there is no "get" Ref: https://github.com/magento/magento2/blob/2.3/app/design/frontend/Magento/luma/Magento_Email/email/footer.html Migrating templates: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/templates/template-email-migration.html Or just switch to use legacy ...


0

I have fixed this issue by change store as storename in param $templateVars = array( 'storeName' => $store->getWebsite($customer->getWebsiteId())->getName(), 'email' => $customer->getEmail(), 'name' => $customer->getFirstname() . ' ' . $customer->getLastname(), 'logo_alt' => $logo['logo_alt'], 'logo_width' =&...


0

This will display the store information in footer of your emails <h2><a href="{{store url=''}}" target="_blank" rel="noopener">{{config path="general/store_information/name"}}</a></h2> <p class="address"> <span class="street-line1"> {{config ...


0

If you want to check if the order is completely shipped, the following function could help: /** * @param Mage_Sales_Model_Order $order * @return boolean */ protected function isOrderCompletelyShipped(Mage_Sales_Model_Order $order) { foreach ($order->getAllItems() as $item) { if ($item->getParentItemId()) { continue; } ...


2

I recommend you use magento logic to send mail https://github.com/DominicWatts/ReviewReminder/blob/d048dbf0ec436f84be89b2f497eecceb1df3a79d/Helper/Order.php#L551-L600 /** * Send transactional email * @param array $vars * @return int */ public function sendTransactionalEmail($vars = []) { $email = $vars['email'] ?? null;...


0

this configurations works! Important change the host to smtp.googlemail.com (thanks Swift Mailer)


0

Finally, I have figured it out. I made it work in Magento 2.2.11. I Had to make some changes to the TransportBuilder.php file. Followed this link https://magento.stackexchange.com/a/274723/73212 and now it's working. TransportBuilder.php <?php namespace MyVendor\PdfInvoice\Model; use Magento\Framework\Mail\MessageInterface; use Magento\Framework\Mail\...


0

maybe this link can help you: How to magento 2 send xml file as a email attachment? if you have any question ask here in comments


Top 50 recent answers are included