By default, OpenCart sends email with the PHP mail() function directly from the hosting server. That server’s address is not in your domain’s SPF record, and the messages have no DKIM signature. Mailbox providers treat such messages as suspicious: order notifications land in spam or never arrive, and DMARC reports show rows with a fail result.
The fix is to send the store’s email through the SMTP server of your domain’s email provider and publish SPF, DKIM, and DMARC records for the domain. Below are the steps for Yandex 360 and for Mail.ru (VK WorkSpace), the two business email providers most used in Russia. The steps are the same; the server address, where you create the password, and the DNS record values differ. The same approach works with any other email provider that offers SMTP.
The guide uses placeholder data:
| What | Example |
|---|---|
| Site domain | example-shop.ru |
| Mailbox the site sends from | info@example-shop.ru |
| Domain email provider | Yandex 360 for Business or Mail.ru for Business (VK WorkSpace) |
| Store platform | OpenCart 3 or LiveStore 3 |
The info@example-shop.ru mailbox must already exist with your domain’s email provider. We explain how to connect Yandex 360 to a domain in our guide to email on your domain.
1. Create an app password
The regular mailbox password does not work for sending from a site: both Yandex and Mail.ru accept only a separate app password over SMTP. Create it while signed in to the mailbox the site will send from.
Yandex 360
- Sign in to Yandex as info@example-shop.ru and open the Security tab in Yandex ID settings.
- In the section on access to your data, choose App passwords.
- Choose the Mail app type, enter a name such as “example-shop.ru website”, and click Next.
- Copy the password. It is shown only once: if the window closes, delete this password and create a new one.
The password does not work right away; according to Yandex documentation, it takes 2–3 hours. In the email clients section of Yandex Mail settings, check that app passwords and OAuth tokens are enabled.
Mail.ru (VK WorkSpace)
- Sign in to the mailbox info@example-shop.ru.
- Open Settings → All settings → Security → Passwords for external apps and click Add.
- Enter a name such as “example-shop.ru website” and save.
- Copy the password. Mail.ru does not store it: if you lose it, create a new one.
A phone number must be linked to the mailbox to create the password. If there is no option for external app passwords, ask the domain administrator in VK WorkSpace to allow the mailbox access from external email clients.
2. Enable SMTP in OpenCart
The site must send email through the email provider’s SMTP server, signed in as the same mailbox that is set as the store’s address.
- Sign in to the site admin panel: example-shop.ru/admin.
- Open System → Settings and click the Edit button (pencil) next to your store.
- On the Store tab, enter info@example-shop.ru in the E-Mail field. It must match the SMTP username, or the mail server will reject the message.
- Go to the Mail tab and fill in the fields from the table.
- Click Save in the top right corner.
| Field | Yandex 360 | Mail.ru (VK WorkSpace) |
|---|---|---|
| Mail Engine | SMTP | SMTP |
| Mail Parameters | leave empty | leave empty |
| SMTP Hostname | ssl://smtp.yandex.ru | ssl://smtp.mail.ru |
| SMTP Username | info@example-shop.ru | info@example-shop.ru |
| SMTP Password | the app password from step 1 | the app password from step 1 |
| SMTP Port | 465 | 465 |
| SMTP Timeout | 15 | 15 |
The ssl:// prefix before the server address is required for port 465: without it, OpenCart will not open a secure connection. The default 5-second timeout is often too short, and the OpenCart documentation recommends raising it to 10–15 seconds.
The same tab has an Additional Alert Mail field. Make sure it lists the store’s working addresses, not developers’ test addresses.
If the site has third-party form extensions (callback request, quick order, newsletters), check their settings: some of them send mail their own way, bypassing the OpenCart settings.
3. Add SPF, DKIM, and DMARC records
Records are added wherever the domain’s DNS is managed: at the registrar, or at the hosting provider if the domain is delegated to its name servers. Look for a section called DNS records, DNS editor, or zone management. If the domain is delegated to Yandex servers, the SPF and DKIM records for Yandex 360 are created automatically, and you only need to add DMARC.
| Type | Name (host) | Yandex 360 | Mail.ru (VK WorkSpace) |
|---|---|---|---|
| TXT | @ | v=spf1 redirect=_spf.yandex.net | v=spf1 redirect=_spf.mail.ru |
| TXT | DKIM | name mail._domainkey, value from the Yandex 360 admin panel | name and value from the VK WorkSpace admin panel |
| TXT | _dmarc | v=DMARC1; p=none; rua=mailto:info@example-shop.ru | |
SPF
A domain must have exactly one record starting with v=spf1. If one already exists, do not add a second one; merge them. The redirect modifier cannot be combined with other sources, so for several services use include, for example v=spf1 include:_spf.yandex.net include:<another service> ~all. There is no need to add the hosting server’s address, since the site now sends mail through the email provider.
Some panels do not accept @ in the name field: in that case, enter the full domain (example-shop.ru.) or leave the field empty.
DKIM
In Yandex 360, open Domains in the organization admin panel, click the DKIM setup button next to the domain, and copy the public key. It starts with v=DKIM1; k=rsa;. The record name is mail._domainkey; some panels need the full name mail._domainkey.example-shop.ru.
In VK WorkSpace, the record value is in the admin panel, in the domain management section under MX and SPF setup. Copy the DKIM record name and value from there unchanged.
DMARC
Start with the p=none policy: messages are not blocked, and the address in rua receives reports on which servers send email on behalf of your domain and whether they pass the checks. We will tighten the policy in step 5.
DNS changes do not take effect immediately: according to Yandex documentation, it can take up to 72 hours. In Yandex 360, the record status updates with the Check button on the Domains page.
4. Test an email from the site
The setup is done when an email from the site passes all three checks.
- Send an email from the site to an external mailbox (Gmail is the most convenient): a password reset, the contact form, or a test order.
- In Gmail, open the message and click More (three dots) → Show original.
- At the top you should see SPF: PASS, DKIM: PASS, DMARC: PASS, and your domain example-shop.ru in the sender address.
If the email did not arrive or a check failed, find the symptom in the table below.
5. Tighten the DMARC policy
Watch the DMARC reports for one or two weeks. Rows with your real messages should show spf pass and dkim pass. Rows from unfamiliar addresses with a fail result are messages spoofing your domain, and those are what you want to cut off.
- Change the
_dmarcrecord tov=DMARC1; p=quarantine; rua=mailto:info@example-shop.ru: spoofed messages will go to spam. - If there are no problems after another week or two, set
p=reject: spoofed messages will be rejected.
Do not set p=reject until email from the site passes the checks. Otherwise customers will stop receiving order notifications.
Common errors
| What you see | Cause | What to do |
|---|---|---|
| Error 535, “Authentication failed” | The regular mailbox password was used, or the app password is not active yet | Enter the app password from step 1; with Yandex, wait 2–3 hours after creating it |
| “Could not connect”, a timeout error | No ssl:// prefix, the timeout is too short, or the hosting provider blocks outbound port 465 | Check the server address and timeout; try tls:// with port 587, or ask the hosting provider to open the port |
| Error 550 or 553 about the sender | The store email does not match the SMTP username | Set the store E-Mail to the same address as the SMTP username |
| SPF still fails | The domain has two SPF records, or DNS has not updated yet | Keep a single v=spf1 record and wait up to 72 hours |
| DKIM fails | The DKIM record was not added or was copied with a mistake | Compare the name and value with the Yandex 360 or VK WorkSpace admin panel |
| Some emails from the site fail the checks | A third-party extension sends mail through mail() | Switch the extension to SMTP or replace it |
| Reports show fail from unfamiliar addresses | Someone is spoofing your domain | This is not a setup error: move to p=quarantine, then to p=reject |
Sources
- App passwords, Yandex ID Help (in Russian).
- Setting up email clients: SMTP settings, Yandex Mail Help (in Russian).
- SPF record, Yandex 360 for Business Help (in Russian).
- DKIM signature, Yandex 360 for Business Help (in Russian).
- Setting up email clients: SMTP and external app passwords, Mail.ru Help (in Russian).
- Setting up an SPF record, VK WorkSpace documentation (in Russian).
- Setting up a DKIM signature, VK WorkSpace documentation (in Russian).
- Mail settings, OpenCart documentation.
- RFC 7208: Sender Policy Framework (SPF), IETF.
- RFC 7489: Domain-based Message Authentication, Reporting, and Conformance (DMARC), IETF.
- Trace an email with its full headers, Gmail Help.


