T
T
Timofey2015-01-09 05:04:25
PHP
Timofey, 2015-01-09 05:04:25

How to set up sending emails through Phpmailer?

Good day, dear ones!
There is a simple page with a form for sending data, you need to organize the sending itself, I have not done this before.
Please share a simple instruction on how to do it correctly or a link to a ready-made solution.
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Volodymyr Godyak, 2015-01-09
@wmgodyak

$mail = new \PHPMailer;

            $mail->setFrom('[email protected]', 'from name');
            $mail->addAddress('[email protected]','user name');
            $mail->addReplyTo('[email protected]','user name');

            $mail->isHTML(true);                                  // Set email format to HTML

            $mail->Subject = 'my subject';
            $mail->Body = " my message body";


            if(!$mail->send()) {
                $error[] = $mail->ErrorInfo;
            }

S
Stepan Yudin, 2015-01-09
@stepan_sib

Here is a comprehensive example
www.sesmikcms.ru/pages/read/ischerpyvajuschaja-ins...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question