M
M
maxxout2016-04-26 11:31:22
PHP
maxxout, 2016-04-26 11:31:22

The minimum set of elements for sending a letter from the site?

Hello.
You need to add the ability to send letters from the site to your mail. As a coder, he did not encounter the server side. As I understand it, in addition to the form on the site, you need to have a php script on the server with the mail () function, and that's all? Or am I misunderstanding the point. Please explain in a nutshell or tell me where to read how easier it is to implement without going too deep into the server part.
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Entelis, 2016-04-26
@DmitriyEntelis

It is better to pick up any ready-made solution, for example, swiftmailer.
It solves many problems with encoding, attachments, etc., etc. + it can send via smtp, which is quite correct.

D
Denis Kainazarov, 2016-04-26
@iit

If sendmail is correctly configured on the server, then you can simply use the mail function, but setting it up yourself is quite difficult, especially so that letters do not go to spam.
Many hosts have sendmail set up a bit, but large hosts usually set it up just fine.
Therefore, there are many ways to send letters - the first is to install a ready-made mail server solution and send through it, it's a bit easier to configure them. The second option is to start mail and send through this mail. And the third is to use api mail systems such as
ExpertSender
Mailgun
Mandril
Or AWS layer for mail.
At work, we use a mail server for one project, even with a digital signature. For other exSender.
I personally use Mailgun and smtp via mail like [email protected] where gmail for business is attached to the domain, $4 per person per month.
As a result, the simplest option is to use as Dmitry swiftmailer advised, connect it to smtp to the finished mail and rejoice. Or we test mail, and also through swiftmailer and kick hosters to make normal mail.

M
maxxout, 2016-04-26
@maxxout

Thanks for answers! It's just that the situation is such that there are very few letters per month (about 20) and everything worked fine through mandrill until it became paid. There, in general, through js, I threw a request to their api and that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question