HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/grapossconnect/include/mail-functions.php
<?php
require 'class.phpmailer.php';

/**DEFINE mail function */
function smtpMail($fromname,$replyto,$title, $subject, $content, $email_id)
{

	$mail = new PHPMailer();
	$mail->IsSMTP(true); // SMTP
	$mail->SMTPAuth   = true;  // SMTP authentication
	$mail->SMTPSecure = 'tls';
	$mail->Mailer = "smtp";
	$mail->SMTPDebug = false;
	$mail->CharSet = "utf-8";

	//Ask for HTML-friendly debug output
	$mail->Debugoutput = 'html';
	$mail->Host       = "email-smtp.ap-south-1.amazonaws.com"; // Amazon SES server, note "tls://" protocol
	$mail->Port       = 587;                    // set the SMTP port
	$mail->Username   = 'AKIATU377FQG5YXAKY4J';  // SES SMTP  username
	$mail->Password   = 'BM4tipPjPdcNQBq1ukMkEQSdInAUP01SsI25XGIXIeEE';
	$mail->SetFrom($fromname, $title);
	$mail->AddReplyTo($replyto, $title);
	$mail->Subject = $subject;
	$mail->MsgHTML($content);
	$mail->AddAddress($email_id, $email_id);
	if ($mail->Send()) {
		return 1;
	} else {
		return 0;
	}
}

function sendmailPartnerWithUs($name, $message, $email, $mobile)
{
	$subject = "Message for Partner";
	$adminEmail = 'info@grapossconnect.com';
	$logo = '/var/www/grapossconnect/images/graposs-logo.png';
	$msg = "<html><head>
	<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
	<meta http-equiv='Content-Language' content='hi'></head>
	<body>";
	$msg .= "<p style='background-color:#064DA9;text-align:center;'><img style='width:177px;' src='" . $logo . "'/></p>  ";
	$msg .= "<p><h2 style='font-size:20px;line-height:24px;font-family:Arial,sans-serif;margin:0;text-align:center;padding:0;font-weight:normal;color:#000!important'>
		     Thanks for connect with us, " . $name . "!</h2></p>";
	$msg .= "<p>Your details</p><br>"
		. "<p> Name : <b>" . $name . "</b>.</p>"
		. "<p> Mobile Number : <b>" . $mobile ."</p>"
		. "<p> Message : <b>" . $message ."</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>Regards,</p>
		<p>Graposs Connect</p>
		</body></html>";

    $title = "Graposs Connect";
	$fromname = "info@grapossconnect.com";
	smtpMail($fromname, $adminEmail, $title, $subject, $msg, $email);
}

function sendContactUsmail($name, $message, $email)
{
	$subject = "Hi! ".$name;
	$adminEmail = 'info@grapossconnect.com';
	$logo = '/var/www/grapossconnect/images/graposs-logo.png';
	$msg = "<html><head>
	<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
	<meta http-equiv='Content-Language' content='hi'></head>
	<body>";
	$msg .= "<p style='background-color:#064DA9;text-align:center;'><img style='width:177px;' src='" . $logo . "'/></p>  ";
	$msg .= "<p><h2 style='font-size:20px;line-height:24px;font-family:Arial,sans-serif;margin:0;text-align:center;padding:0;font-weight:normal;color:#000!important'>
		     Thanks for contacting us, Dear " . $name . "!</h2></p>";
	$msg .= "<p>Your details</p><br>"
		. "<p> Name : <b>" . $name . "</b>.</p>"
		. "<p> Message : <b>" . $message ."</p>"
		. "<p> We will right back to you</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>Regards,</p>
		<p>Graposs Connect</p>
		</body></html>";

    $title = "Graposs Connect";
	$fromname = "info@grapossconnect.com";
	smtpMail($fromname, $adminEmail, $title, $subject, $msg, $email);
}
function sendCareerMail($name, $message, $email)
{
	$subject = "Hi! ".$name;
	$replyMail = 'jobs@grapossconnect.com';
	$logo = '/var/www/grapossconnect/images/graposs-logo.png';
	$msg = "<html><head>
	<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
	<meta http-equiv='Content-Language' content='hi'></head>
	<body>";
	$msg .= "<p style='background-color:#064DA9;text-align:center;'><img style='width:177px;' src='" . $logo . "'/></p>  ";
	$msg .= "<p><h2 style='font-size:20px;line-height:24px;font-family:Arial,sans-serif;margin:0;text-align:center;padding:0;font-weight:normal;color:#000!important'>
		     Thanks for contacting us, Dear " . $name . "!</h2></p>";
	$msg .= "<p>Your details</p><br>"
		. "<p> Name : <b>" . $name . "</b>.</p>"
		. "<p> Message : <b>" . $message ."</p>"
		. "<p> We will right back to you</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>Regards,</p>
		<p>Graposs Connect</p>
		</body></html>";

    $title = "Graposs Connect";
	$fromname = "info@grapossconnect.com";
	$mailSend = smtpMail($fromname, $replyMail, $title, $subject, $msg, $email);

	if($mailSend == 1) {
		// sendToadmin($name, $message, $email);
	}


}

function sendToadmin($name, $message, $email){

	$subject = "Hi! ".$name;
	$replyMail = "info@grapossconnect.com";
	$logo = '/var/www/grapossconnect/images/graposs-logo.png';
	$msg = "<html><head>
	<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
	<meta http-equiv='Content-Language' content='hi'></head>
	<body>";
	$msg .= "<p style='background-color:#064DA9;text-align:center;'><img style='width:177px;' src='" . $logo . "'/></p>  ";
	$msg .= "<p><h2 style='font-size:20px;line-height:24px;font-family:Arial,sans-serif;margin:0;text-align:center;padding:0;font-weight:normal;color:#000!important'>
		     Thanks for contacting us, Dear " . $name . "!</h2></p>";
	$msg .= "<p>Your details</p><br>"
		. "<p> Name : <b>" . $name . "</b>.</p>"
		. "<p> Message : <b>" . $message ."</p>"
		. "<p> Email : <b>" . $email ."</p>"
		. "<p> We will right back to you</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>Regards,</p>
		<p>Graposs Connect</p>
		</body></html>";
	$adminMail = "gulfam.ali@grapossconnect.com";
    $title = "Graposs Connect";
	$fromname = "info@grapossconnect.com";
	smtpMail($fromname, $replyMail, $title, $subject, $msg, $adminMail);
}

function sendSubscriptionmail($name, $username, $password, $subjects, $class, $transactionId, $email)
{
	$subject = "You are successfully Registered on Shine Olympiad";
	$adminEmail = "info@grapossconnect.com";
	$msg  = "<p><strong>Dear " . $name . "</strong>,</p>";
	$msg .= "<p>This email acknowledges the registration of your ward ".$name." in Shine Olympiad as the details presented below.</p>";
	$msg .= "<p><strong>Student Name : ".$name."</strong></p>";
	$msg .= "<p><strong>Login : ".$username."</strong></p>";
	$msg .= "<p><strong>Password : ".$password."</strong></p>";
	$msg .= "<p><strong>Class : ".$class."</strong></p>";
	$msg .= "<p><strong>Transaction Id : ".$transactionId."</strong></p>";
	$msg .= "<p><strong>Subject Opted : ".$subjects."</strong></p>";
	$msg .= "<p>For detailed information on the syllabus, question pattern, marking scheme and other important information, please visit our website https://shineolympiad.com/. The Exams are tentatively scheduled and date is given on website; however, you will be updated by the exact date and time in due course of time through SMS/Email notifications.</p>";
	$msg .= "<p>Get access to the relevant study material by subscribing to our Shine Olympiad youtube channel. <a href='https://www.youtube.com/channel/UCqUUYs-ZxDBAM9qRG7nKW4w'>Click Here to Subscribe.</a></p>";
	$msg .= "<p>For support related to Registration, please email us at info@shineolympiad.com.</p>";
	$msg .= "<p>Thank you with regards,</p>";
	$msg .= "<p>Shine Olympiad</p>";
	$msg .= "<p>https://shineolympiad.com/</p>";
    $title = "Graposs Connect";
	$fromname = "info@grapossconnect.com";
	smtpMail($fromname, $adminEmail, $title, $subject, $msg, $email);
}