oop - php mail in object oriented -


i want send mail through php code.i'm familiar procedural i'm newbie object oriented(oop).my mailing code working in procedural bt not in oop.

if(isset($_request['send'])) { $name=$_request['name']; $email=$_request['email']; $phone=$_request['phone']; $message=$_request['message']; include "config.php";  $sql = $conn->query("insert message(name,email,phone,message) values ('$name','$email','$phone','$message')");   $from = $email;      $to= 'web@gmail.com';      $headers1 = "from: $from\n"; echo     $body = "  hello sir,  request give authority access parkintrade website guest     user.    user details    name    : $name    email   : $email    phone   : $phone    message : $message  ";   $body.="\nthis auto generated email please not reply email.   thank you,   $name\n";   echo  $sentmail = mail( $to,"welcome ", $body, $headers1 ); } 

enlighten phpmailer.


Comments