V
V
Vanes Ri_Lax2017-07-24 15:14:27
PHP
Vanes Ri_Lax, 2017-07-24 15:14:27

How to send mail via SMTP?

Hello,
the server has modx evolution version 1.0.10.
there is a feedback form on the site, when filling it out, you need to send data to the mail via SMTP, since the server itself does not have services like sendmail, etc.
The form is called like this:

[!eForm? &formid="Send" &tpl="form-tpl" &to= "[email protected]" &report="report-tpl" &thankyou="thank-tpl" &vericode="1" &subject="Сообщение с моего сайта"!]

how to configure so that data is sent via SMTP?
Thank you very much in advance

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
VaneS Ri_Lax, 2017-07-26
@vanesxl

In ModX, the form was sent via eform, which in turn tries to send messages to mail via PHPMailer, which I have at:
Downloaded the current version from github and deployed at:
Then I went to:
/www/assets/snippets/eform
there there is a file: eform.inc.php
There I connected the current version of PHPMailer, and rewrote the message sending code, according to the example in the documentation https://github.com/PHPMailer/PHPMailer
I used mail.ru as a mail server, judging by the documentation, it is necessary use port 465, but for some reason PHPMailer hung for me, then I registered port 25, and commented out the line in the code: So everything started working for me.

L
Larisa Moroz, 2017-07-24
@larisamoroz

Use PHP mailer :
www.sesmikcms.ru/pages/read/ischerpyvajuschaja-ins...

D
Dmitry, 2017-07-24
@backender_ru

You can also use SwiftMailer

A
Alex Zaharchuk, 2017-07-24
@olekmay

Here is an example of sending via smtp: www.php.su/articles/?cat=email&page=007

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question