Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'mail.pondokit.com'; // Specify main and backup SMTP servers
- $mail->SMTPDebug = 2;
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'mail@pondokit.com'; // SMTP username
- $mail->Password = 'password'; // SMTP password
- $mail->Port = 465;
- $mail->setFrom('jihantoro2@gmail.com', 'Rubi Jihantoro');
- $mail->addAddress('jihantoro8@gmail.com', 'Joe User'); // Add a recipient
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = 'Here is the subject';
- $mail->Body = 'This is the HTML message body <b>in bold!</b>';
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement