[ Root System Explorer ]
Location:
Root
/
var
/
www
/
html
/
acma.in
/
acma-ec-election-2025-26-bpk
/
php
/
helper
+ Folder
+ File
Upload
Editing: verification.php
<?php class Verfication { public function sendEmail($useremail) { $otp = rand(1000,9999); // $otp = '1234'; $email = new \SendGrid\Mail\Mail(); $email->setFrom("acma@acma.in", "ACMA"); $email->setSubject("OTP"); $email->addTo($useremail, "Company"); $email->addContent( "text/html", "Your One Time Password is <strong>{$otp}</strong>" ); $sendgrid = new \SendGrid(constant('MAIL_PASSWORD')); try { $response = $sendgrid->send($email); return $response->statusCode() === 202 ? $otp : false; } catch (Exception $e) { // echo 'Caught exception: '. $e->getMessage() ."\n"; return false; } } public function sendMobileOTP($phone) { $otp = rand(1000, 9999); // Twilio credentials $sid = 'ACf4bd24c0cf7855f2e7c4b5ad2a905454'; $token = '23e1968b1a282e2a3ef1c439f8b6013e'; $from = '+19086508029'; // Your Twilio number // OTP message $message = "Your One Time Password (OTP) for mobile number verification is $otp - Automotive Component Manufacturers Association of India"; try { $twilio = new Client($sid, $token); $twilio->messages->create($phone, [ 'from' => $from, 'body' => $message ]); return $otp; } catch (Exception $e) { // Optionally log error: $e->getMessage() return false; } } } ?>
SAVE CHANGES
[ CANCEL ]
Name
Type
Actions
.. (Parent Directory)
📄 generate_pdf.php
FILE
Ren
[EDIT]
DEL
📄 verification.php
FILE
Ren
[EDIT]
DEL