By default, in OkayCMS, sending mail from the site is carried out using the standard PHP mail () function. This functionality does not require a third-party server to send Email. But at the same time, this method has several critical drawbacks that make it unreliable.
First, there may be failures in sending letters on the hosting side.
Secondly, such popular mail services as Gmail, Yandex.Mail, Mail.ru mark emails sent from the site via the PHP mail () function as not confirmed with a "?" In addition, such emails may end up in the recipient's Spam folder.
To avoid such problems, the safest way is to configure the sending of Email messages via SMTP. SMTP (Simple Mail Transfer Protocol) is a network protocol for bulk email transfer.
SMTP servers are provided by hosters and postal services. Therefore, corporate mailboxes created on the SMTP server have authentication, as a result of which letters go to the recipient's Inbox folder.
To configure SMTP transmission in OkayCMS, you need:
- Create a mailbox that will be linked to the SMTP server. This can be done either on your hosting, or using an email service, for example, Yandex or Gmail.
- Go to the admin panel of your site, section Site settings -> Notification settings -> Enable SMTP. You also need to enter the appropriate data in the fields below:
- SMTP server address / SMTP host - depends on whose server you will use, for example, for Gmail it might be smtp.gmail.com
- SMTP port - it also depends on whose server your mail will be located, for the same Gmail it is 465 or 587, depending on the type of encryption
- SMTP login - your Email on hosting or mail service
- SMTP password - password from Email
More information on setting up SMTP on Gmail here .
ATTENTION! The Email you specified will be substituted in the sender field. Therefore, we recommend that you take care of creating a corporate domain mail. This can be done on a hosting or mail service. However, Gmail has a paid service. If you use Yandex mail, you can create a corporate mailbox for free. To do this, you need to log in to your account and follow the link https://pdd.yandex.ru/ .
Domain mail is optional for SMTP. But, as a rule, corporate mail inspires more trust in the client in relation to your company.