Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $fromName = $_POST['username'];
- $fromEmail = $_POST['email'];
- $theMessage = $_POST['message'];
- $theSubject = $_POST['subject'];
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host = 'smtp.hosts.co';
- $mail->SMTPAuth = true;
- $mail->Username = 'username';
- $mail->Password = '.........';
- $mail->From = 'person@ourcompany.com';
- $mail->FromName = 'ourcompany';
- $mail->addAddress('support@ourcompany.com', 'ourcompany');
- $mail->addReplyTo($fromEmail, $fromName);
- $mail->Subject = $theSubject;
- $mail->Body = "<p>You have got a email from <b>{$fromName}<{$fromEmail}></b></p>";
- $mail->Body .= "<p><b>The actual message is given bellow</b></p>";
- $mail->Body .= "<p>";
- $mail->Body .= nl2br($theMessage);
- $mail->Body .= "</p>";
- $mail->From = 'person@ourcompany.com';
- $fromName = $_POST['username'];
- You have got a email from sendername<sender@gmail.com>
- The actual message is given bellow
- Hi,.........................
Add Comment
Please, Sign In to add comment