Answer the question
In order to leave comments, you need to log in
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="Сообщение с моего сайта"!]
Answer the question
In order to leave comments, you need to log in
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.
Use PHP mailer :
www.sesmikcms.ru/pages/read/ischerpyvajuschaja-ins...
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 questionAsk a Question
731 491 924 answers to any question