S
S
serafino-family2018-06-07 18:22:05
PHP
serafino-family, 2018-06-07 18:22:05

How to send messages using phpmailer()?

Hello dear. On YouTube and in Google, I did not find a normal guide on how to implement mail transfer through phpmailer (), pigeon is more convenient, of course, but I want a mailer. What plugins are needed? There is a desire to throw off the GET or POST form processing code, I don’t know how it should be. Help out.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolay, 2018-06-07
@iNickolay

First link on google

T
ThunderCat, 2018-06-07
@ThunderCat

$body = '<h1>Hello Mail!</h1>';
        $from = '[email protected]';
        $to = '[email protected]'; 
        $name = 'Kolaenich88';
        $subject = 'Sharik, ti balbes!';
       $mailer = new PHPMailer();
//далее по докам настраиваете подключение к почтовому серверу, и
        $mail->setFrom($from, '');
        $mail->addAddress($to, $name);
        $mail->Subject = $subject;
        $mail->Body    = $body;
        $mail->send();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question