Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multisotre: Mail send from backend(change status, comments) are send with bad domain #49

Closed
dezzer opened this issue Feb 1, 2017 · 14 comments

Comments

@dezzer
Copy link

dezzer commented Feb 1, 2017

Hello,
We have setup Magento2 with Multistore on two saperate domains with gmailsmtpapp.
If client make order from domain1.com then mail came from domain1.com ( this behavior is OK.)
But if Administrator log to backend http://domain2.com/admin/ and navigate to orders and change somthing in customer order from domain1.com then client get mail from domain2.com(witch administrator is logged) ( this behavior is bad).

I think sending e-mail to customer from backends should be independend on domain where administrator is log in. Customer should get mail from domain1.com where he make order.

What do you think about this?

@srenon
Copy link
Contributor

srenon commented Feb 1, 2017

@dezzer ... Is it possible for you to disable this module, then follow the same step in core magetno and let me know if core magento behave differently?

@srenon
Copy link
Contributor

srenon commented Feb 1, 2017

@dezzer ... in store -> config, did you enter two different email credential for both store (for domain1.com and domain2.com)?

@dezzer
Copy link
Author

dezzer commented Feb 1, 2017

@srenon in store -> config > system>Gmail/google apps Pro for each domain i have different credential.
( in 15min i will check with disable module)

@dezzer
Copy link
Author

dezzer commented Feb 1, 2017

@srenon the same situation without gmailsmtpapp.

@srenon
Copy link
Contributor

srenon commented Feb 1, 2017

@dezzer ... did you check https://github.com/magento/magento2/issues to see if this issue is reported

@dezzer
Copy link
Author

dezzer commented Feb 1, 2017

@srenon i found similar problem magento/magento2#8117 (comment)

i use "temporary" patch: magento/magento2#8117 (comment)

and its work but with disabled gmailsmtpapp

with enabled mail are not sending.

@srenon
Copy link
Contributor

srenon commented Feb 1, 2017

@dezzer ... I don't think that code should affect this module, after enabling did you run php bin/magento setup:upgrade?

@dezzer
Copy link
Author

dezzer commented Feb 1, 2017

@srenon yes i did. When i go to order and fill "Comment" form and check "Notify Customer by Email" then i get error "incorrect envelope address"

@srenon
Copy link
Contributor

srenon commented Feb 1, 2017

Does the frontend still work?

You can debug by checking the values below

if(isset($this->templateVars['store'])){
	$scope_id = $this->templateVars['store']->getId();
	$result = $this->_senderResolver->resolve($from, $scope_id);
            // check to see what the output of $result['email'], $result['name'] with and without this code

}else{
	$result = $this->_senderResolver->resolve($from);
}

@dezzer
Copy link
Author

dezzer commented Feb 1, 2017

@srenon before debug i check frontend ,and its work.
I made order in domain1.com and after that i login to domain1.com/admin and sent comment with checked "Notify Customer by Email" to customer and its work. after that i login to domain2.com/admin and do the same but i get error: incorrect envelope addres

@QuentinHK
Copy link

Hi, I'm facing the same issue.
@dezzer did you find any work around, please?

@srenon
Copy link
Contributor

srenon commented Jul 19, 2017

@QuentinHK ... I will look into this shortly

@dondezo
Copy link

dondezo commented Sep 19, 2017

@QuentinHK Unfortunately not, sorry for delay in my answer.

@srenon
Copy link
Contributor

srenon commented Nov 6, 2017

I'm going to close this since they are multiple issues open for the same problem ...

#75

magento/magento2#11695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants