-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
33 lines (32 loc) · 843 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/*require('fpdf.php');
$pdf=new FPDF();
$pdf->AddPage();
$pdf->Image("certificate.jpg",0,0,210,150);
$pdf->Output("test.pdf","F");*/
include('smtp/PHPMailerAutoload.php');
$mail=new PHPMailer();
$mail->isSMTP();
$mail->Host='smtp.gmail.com';
$mail->Port=587;
$mail->SMTPSecure="tls";
$mail->SMTPAuth=true;
$mail->Username="[email protected]";
$mail->Password="Karthik@123";
$mail->setFrom("[email protected]");
$mail->addAddress("[email protected]");
$mail->isHTML(true);
$mail->Subjet="Certificate Generated";
$mail->Body="Certificate Generated";
$mail->addAttachment("certificate/1588786846.pdf");
$mail->SMTPOptions=array("ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
"allow_self_signed"=>false,
));
if($mail->send()){
echo "Send";
}else{
echo $mail->ErrorInfo;
}
?>