Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host = 'server'; // server that provide my hosting
- $mail->SMTPAuth = true;
- $mail->Username = 'exsample@domain.ltd';
- $mail->Password = 'my_password';
- $mail->SMTPSecure = 'ssl';
- $mail->Port = 465; // port provided by my hosting for smtp
- $mail->setFrom('exsample@domain.ltd', 'PanaTech');
- $mail->addAddress($contacter['email'], $contacter['full_name']);
- $mail->addReplyTo('exsample@domain.ltd', 'PanaTech');
- $mail->Subject = $subject;
- $mail->Body = $message;
- mail->AltBody = $message;
- 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