2

How to solve this ?

03 17:24:57] main.CRITICAL: Invalid email format {"exception":"[object] (Magento\Framework\Validator\Exception(code: 0): Invalid email format at /home/xyz/public_html/vendor/magento/framework/Model/AbstractModel.php:710)"} []

here is my order_new.html

<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<!--@subject {{trans "Your Order : %increment_id confirmation" increment_id=$order.increment_id |raw}} @-->
<!--@vars {
"var formattedBillingAddress|raw":"Billing Address",
"var order.getEmailCustomerNote()":"Email Order Note",
"var order.increment_id":"Order Id",
"layout handle=\"sales_email_order_items\" order=$order area=\"frontend\"":"Order Items Grid",
"var payment_html|raw":"Payment Details",
"var formattedShippingAddress|raw":"Shipping Address",
"var order.getShippingDescription()":"Shipping Description"
"var shipping_msg":"Shipping message"
} @-->

{{template config_path="design/email/header_template"}}

<table>
    <tr class="email-intro">
        <td>
            <p class="greeting">{{trans "%customer_name," customer_name=$order.getCustomerName()}}</p>
            <p>
                {{trans "Thank you for your order from %store_name." store_name=$store.getFrontendName()}}
                {{trans "Once your package ships we will send you a tracking number."}}
                {{trans 'You can check the status of your order by <a href="%account_url">logging into your account</a>.' account_url=$this.getUrl($store,'customer/account/',[_nosid:1]) |raw}}
            </p>
            <p>
                {{trans 'If you have questions about your order, you can email us at <a href="mailto:%store_email">%store_email</a>.' store_email=$store_email |raw}}
            </p>
        </td>
    </tr>
    <tr class="email-summary">
        <td>
            <h1>{{trans 'Your Order <span class="no-link">#%increment_id</span>' increment_id=$order.increment_id |raw}}</h1>
            <p>{{trans 'Placed on <span class="no-link">%created_at</span>' created_at=$order.getCreatedAtFormatted(1) |raw}}</p>
        </td>
    </tr>

    <tr class="email-summary">
        <td>
            <h1 style="font-size: 17px;">Customer Email: <span class="no-link">{{var order.getCustomerEmail()|escape|nl2br}}</span></h1>
        </td>
    </tr>

    <tr class="email-information">
        <td>
            {{depend order.getEmailCustomerNote()}}
            <table class="message-info">
                <tr>
                    <td>
                        {{var order.getEmailCustomerNote()|escape|nl2br}}
                    </td>
                </tr>
            </table>
            {{/depend}}
            <table class="order-details">
                <tr>
                    <td class="address-details">
                        <h3>{{trans "Billing Info"}}</h3>
                        <p>{{var formattedBillingAddress|raw}}</p>
                        <p>{{trans "%email," email=$order.getCustomerEmail()}}</p>
                    </td>
                    {{depend order.getIsNotVirtual()}}
                    <td class="address-details">
                        <h3>{{trans "Shipping Info"}}</h3>
                        <p>{{var formattedShippingAddress|raw}}</p>
                        <p>{{trans "%email," email=$order.getCustomerEmail()}}</p>
                    </td>
                    {{/depend}}
                </tr>
                <tr>
                    <td class="address-details">
                        <h3>{{trans "Customer Comment"}}</h3>                        
                        <p>{{trans "%comment," comment=$order.getOscOrderComment()}}</p>
                    </td>                    
                    <td class="address-details">

                    </td>                   
                </tr>
                <tr>
                    <td class="method-info">
                        <h3>{{trans "Payment Method"}}</h3>
                        {{var payment_html|raw}}
                    </td>
                    {{depend order.getIsNotVirtual()}}
                    <td class="method-info">
                        <h3>{{trans "Shipping Method"}}</h3>
                        <p>{{var order.getShippingDescription()}}</p>
                        {{if shipping_msg}}
                        <p>{{var shipping_msg}}</p>
                        {{/if}}
                    </td>
                    {{/depend}}
                </tr>
            </table>
            {{layout handle="sales_email_order_items" order=$order area="frontend"}}
        </td>
    </tr>
</table>

{{template config_path="design/email/footer_template"}}
2
  • share your email template in your question for which you are facing issues.
    – Sumit
    Sep 4, 2019 at 1:11
  • @Sumit i just overrride order_new.html,i add my template above Sep 4, 2019 at 4:26

1 Answer 1

1

Check di.xml file of your custom modules, maybe your custom module class is overriding the core email functionality Magento\Framework\Mail\Message.

Check this core class in your files.

Hope this will help!!!

12
  • after update this code which commands i have to run ? Sep 4, 2019 at 4:45
  • You need to run php bin/magento s:s:d and php bin/magento cache:flush from the root of the website.
    – Sumit
    Sep 4, 2019 at 4:45
  • i updated your code but not working,before it was working suddenly this problem occurs Sep 4, 2019 at 4:50
  • would you please this also - magento.stackexchange.com/questions/287493/… Sep 4, 2019 at 4:51
  • 1
    yes i override this and when comment that code now mail is working thanks man for your valuable time Sep 4, 2019 at 8:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.