Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //connection file
- require_once "../dbconfig.php";
- $stmt = $db_con->prepare("SELECT * FROM tbl_sys");
- $stmt->execute();
- $sysRow = $stmt->fetch(PDO::FETCH_BOTH);
- $secure=$sysRow['secure'];
- $host=$sysRow['host'];
- $port=$sysRow['port'];
- $sys_email=$sysRow['sys_email'];
- $user_name=$sysRow['userName'];
- $password=$sysRow['password'];
- $sender=$sysRow['sender'];
- $replyTo=$sysRow['replyTo'];
- ?>
- <?php
- class CV{
- function send_mail($sys_email,$message,$subject){
- require_once"../send_careers.php";
- require_once('mailer/class.phpmailer.php');
- require_once"query.php";
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->SMTPDebug = 1;
- $mail->SMTPAuth = true;
- $mail->SMTPSecure = $secure;
- $mail->Host = $host;
- $mail->Port = $port;
- $mail->AddAddress($sys_email);
- $mail->Username=$user_name;
- $mail->Password=$password;
- $mail->SetFrom($sender,'Prassi e Ricerca Onlus');
- $mail->AddReplyTo($replyTo,"Lia Bambagioni Prassi e Ricerca");
- $mail->Subject = $subject;
- $mail->MsgHTML($message);
- $mail->addAttachment($targetPath, $firstLast);
- $mail->Send();
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement