I have Magento 2.1.7 with 2 websites.

First site is www.domain.com

second site is second.domain.com

The scope for users is website so that each website has its own users. The first website everything works great users can get email recover password etc.

The problem is with my second website that i have in a subdomain. Users don't receive any mail from this. If i try to reset the code from backend i get the message user will receive the mail but no mail is being sent.

Probably i haven't done something in the settings correct but i am new to Magento and don't know what i might have done wrong i search the forums but couldn't find a solution.

Also i don't know if this is related to my mx records

domain.com. A 
second  A 
ftp A 
mail    A 
pop A 
smtp    A 
www A 
www.second  A 
domain.com. NS  ns1.domain.com. 
domain.com. NS  ns2.domain.com. 
domain.com. MX  0 aspmx.l.google.com.   
domain.com. MX  10 alt1.aspmx.l.google.com. 
domain.com. MX  10 alt2.aspmx.l.google.com. 
domain.com. MX  20 alt3.aspmx.l.google.com. 
domain.com. MX  20 alt4.aspmx.l.google.com. 
domain.com. TXT "v=spf1 a mx ip4: ~all"

This is how i set up the index.php for the second domain.

require __DIR__ . '/app/bootstrap.php';

$params = $_SERVER;

$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'second';

$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);

/** @var \Magento\Framework\App\Http $app */

$app = $bootstrap->createApplication('Magento\Framework\App\Http');


If anyone has any idea thank you.

  • Have you checked the email logs on the server? There might be a sort of blocking on the SMTP server side based on the domain. Does not look like there's a reason in Magento configuration – Yaroslav Rogoza Jun 24 '17 at 13:22
  • Yes i have checked the logs there was nothing blocking on the smtp server side. – Lelantos Jun 24 '17 at 16:06

@ Yaroslav Rogoza you were right i rechecked my logs and found the problem.

It was an authentication problem with google.

F=<XXX@xxx.xxxxx.com> R=lookuphost T=remote_smtp H=gmail-smtp-in.l.google.com [xxxx:xxxx:xxxx:xxx::xx] X=TLSv1.2:XXXX-XXX-XXXXXX-XXX-XXXXXX:XXX CV=yes: SMTP error from remote mail server after pipelined end of data: 550-5.7.1 [xxx:xxx:xxx:xxx::x] Our system has detected that this message does\n550-5.7.1 not meet IPv6 sending guidelines regarding PTR records and\n550-5.7.1 authentication. Please review\n550-5.7.1  https://support.google.com/mail/?p=IPv6AuthError - gsmtp

So the easiest solution i just disabled the ipv6 for now and everything worked perfect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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