Bitrix Calculator with Guaranteed Email Delivery
Almost every second Bitrix calculator faces email delivery issues. The client enters data, clicks "Calculate," and the email with the result either never arrives or lands in spam. The culprit is using the built-in mail(), missing SPF/DKIM, and unoptimized mail templates. We solve these problems at the architecture level: we use CEvent::Send with an asynchronous queue, configure SMTP via a transactional service, and add DNS records. As a result, over 95% of emails reach the inbox. Our experience includes more than 50 implemented calculators.
The calculator includes client-side JavaScript with reactive recalculation, a server-side PHP handler integrated with infoblocks and prices, and an email engine based on events. Data is never lost: all calculations are logged in an HL-block calculator_logs. The average time savings on request processing is up to 40%, and the cost of email infrastructure drops by 30%.
How the Bitrix Calculator Works
The calculator consists of three parts:
Client-side logic (JavaScript). Reactive recalculation as parameters change — no server requests. This is critical for UX: the user doesn't wait for a response with every slider movement. The average interface response time is under 50 ms.
Server-side handler (PHP/Bitrix). Receives parameters, validates them, pulls current prices from the catalog, and generates the final data. Real prices are recorded here — client-side data can be forged. The handler can process up to 100 requests per second without performance loss.
Email sending system. We use the main module with the CEvent class and email templates. This allows template editing via the admin panel, a sending log, and an asynchronous queue. We added support for attachments (PDF) and SMTP configuration for guaranteed delivery.
Comparison of Email Sending Methods
| Method | Advantages | Disadvantages |
|---|---|---|
CEvent::Send |
Asynchronous, logging, templates in admin | Depends on the sending agent |
mail() directly |
Simplicity | Blocks on send time, high spam risk |
| Via SMTP (main module) | Full delivery control, SPF/DKIM | Requires external server setup |
Using CEvent results in 3 times fewer delivery failures compared to direct mail() calls, as confirmed by our practice on over 50 projects.
Why Emails End Up in Spam?
Key reasons:
- No SPF and DKIM records for the sender's domain.
- Using
mail()instead of SMTP — mail servers often block such emails. - The email template contains trigger words (e.g., "free," "promotion").
The solution is to configure SMTP via a corporate mail server or transactional service (SendGrid, Mailgun) and add an SPF record (Wikipedia). After this setup, over 95% of emails land in the inbox, and the spam rate drops by a factor of 5.
How to Integrate the Calculator with Bitrix24
After sending the email, we call the REST method crm.lead.add — a lead is created automatically. Simultaneously, a notification is sent to the manager via Telegram Bot API. All operations are logged in the HL-block calculator_leads. This allows tracking every calculation without loss. Such integration increases the conversion of requests into deals by 25-30%.
Table: Basic vs. Extended Calculator Functionality
| Feature | Basic | Extended |
|---|---|---|
| Email sending | Yes | Yes |
| PDF estimate | No | Yes |
| CRM integration | No | Yes |
| Telegram notifications | No | Yes |
| Calculation history | No | Yes (personal account) |
The extended version increases conversion of requests into deals by 25-30%.
From Our Practice: Apartment Renovation Cost Calculator
For a construction company, we developed a calculator with options for renovation type, area, and additional work. The result was a cost and timeline range. The client receives a PDF with a detailed estimate via email, and the manager gets a Telegram notification and a lead in CRM. The PDF is generated server-side using mPDF with the company logo. Everything runs in a single form handler. In one month, the calculator processed over 500 requests, of which 40% turned into leads.
What the Work Includes
- Architecture design: client logic, server handler, email templates.
- Calculator development with catalog linking (infoblocks, prices, availability).
- Mail event and SMTP configuration.
- PDF generation (optional).
- Integration with Bitrix24 and Telegram.
- Saving calculation history in an HL-block.
- Documentation and access handover.
- One month warranty support.
Development Timelines
- Basic calculator + email sending — 3–5 days
-
- PDF generation — +1–2 days
-
- CRM Bitrix24 integration — +1 day
-
- Telegram notifications — +0.5 days
-
- Calculation history in personal account — +2–3 days
The cost is calculated individually. To get an estimate for your project, contact us. Receive a consultation before work begins.
We guarantee that every calculator undergoes load testing and email delivery verification. Drawing on over 50 successful implementations, we assume all technical risks.

