magepal / magento2-gmail-smtp-app

Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers
https://www.magepal.com
319 stars 147 forks source link

From address empty when the plugin is enabled. #116

Closed mariamghalleb closed 6 years ago

mariamghalleb commented 6 years ago

Magento version #: 2.2.4

Edition (EE, CE, OS, etc): CE

Expected behavior: From Address Email shouldn't be empty.

Actual behavior: From Address Email is empty.

Steps to reproduce:

  1. Enable your smtp module
  2. Sales->Orders->Select any order->Write down a comment->Notify customer By Email->Submit Email 3.The email is sent with no "From address" (see attachement) capture

Preconditions

Php 7, Magento CE 2.2.4

PLEASE NOTE:

This occurs only when your SMTP module is enabled.

srenon commented 6 years ago

@mariamghalleb

I'm not able to reproduce your issue on a fresh install of Magento 2.2.4

image

mariamghalleb commented 6 years ago

can you please screenshot your SMTP configuration?

palo commented 6 years ago

Same here.

  host gmail-smtp-in.l.google.com [***.***.**.**]
    SMTP error from remote mail server after pipelined end of data:
    550-5.7.1 [**.**.***.**      11] Our system has detected that this message is
    550-5.7.1 not RFC 5322 compliant:
    550-5.7.1 'From' header is missing.

Running Magento CE 2.2.4 | PHP 7.0.30 | SMTP pro v1.5.2

Was working fine, not sure which magento update broke it. Have tried multiple settings. Can sent correct test email. Magento order emails are missing 'From' header. Password recovery is ok. Nothing relevant in logs.

palo commented 6 years ago

@mariamghalleb quick workaround if your not using multistore:

in 'vendor/magepal/magento2-gmailsmtpapp/Plugin/Mail/TransportPlugin.php' at line 70 add $message->setFrom('yourshop@example.com');

Example:

        if ($returnPathEmail !== null && $dataHelper->getConfigSetFrom()) {
            $message->clearFrom();
            $message->setFrom($returnPathEmail);
        }

        $message->setFrom('yourshop@example.com');

recompile, clear cache, ...

srenon commented 6 years ago

@palo ... you should update to the latest version

srenon commented 6 years ago

@mariamghalleb @palo ... take a look at https://github.com/magepal/magento2-gmail-smtp-app/issues/113

palo commented 6 years ago

@srenon thanks for helping