<?php
/*
$dir="http://localhost/codes/glad-tradings-app/";
$company = "GLAD TRADINGS";
$company_address = "USA";
$company_email = "info@gladtradings.com";
$company_website = "gladtradings.com";
$u_email = "omojowotaiwo@gmail.com";
$u_subject ="LOGIN ACCESS";
$u_message ="<p>Hi <b>James Daniel Niniola</b>;</p> <p>Your account was recently accessed. Be sure you have authorized this action otherwise feel free to contact us via e-mail: <b>$company_email</b></p>";
//require("../j_incs/mail.php");
*/
$tox=$u_email;
$fromx=$company_email;
$subjectx=$u_subject;
//
$apos="'";
$message ='
<!DOCTYPE html PUBLIC>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title>Oxygen Welcome</title>

  <style type="text/css">
    img { max-width: 600px; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic;}
    a img { border: none; }
    table { border-collapse: collapse !important;}
    #outlook a { padding:0; }
    .ReadMsgBody { width: 100%; }
    .ExternalClass { width: 100%; }
    .backgroundTable { margin: 0 auto; padding: 0; width: 100% !important; }
    table td { border-collapse: collapse; }
    .ExternalClass * { line-height: 115%; }
    .container-for-gmail-android { min-width: 600px; }


    * {
      font-family: Helvetica, Arial, sans-serif;
    }

    body {
      -webkit-font-smoothing: antialiased;
      -webkit-text-size-adjust: none;
      width: 100% !important;
      margin: 0 !important;
      height: 100%;
      color: #676767;
    }

    td {
      font-family: Helvetica, Arial, sans-serif;
      font-size: 14px;
      color: #777777;
      text-align: center;
      line-height: 21px;
    }

    a {
      color: #676767;
      text-decoration: none !important;
    }

    .pull-left {
      text-align: left;
    }

    .pull-right {
      text-align: right;
    }

    .header-lg,
    .header-md,
    .header-sm {
      font-size: 32px;
      font-weight: 700;
      line-height: normal;
      padding: 35px 0 0;
      color: #4d4d4d;
    }

    .header-md {
      font-size: 24px;
    }

    .header-sm {
      padding: 5px 0;
      font-size: 18px;
      line-height: 1.3;
    }

    .content-padding {
      padding: 20px 0 30px;
    }

    .mobile-header-padding-right {
      width: 290px;
      text-align: right;
      padding-left: 10px;
    }

    .mobile-header-padding-left {
      width: 290px;
      text-align: left;
      padding-left: 10px;
    }

    .free-text {
      width: 100% !important;
      padding: 10px 60px 0px;
    }

    .block-rounded {
      border-radius: 5px;
      border: 1px solid #e5e5e5;
      vertical-align: top;
    }

    .button {
      padding: 30px 0;
    }

    .info-block {
      padding: 0 20px;
      width: 260px;
    }

    .block-rounded {
      width: 260px;
    }

    .info-img {
      width: 258px;
      border-radius: 5px 5px 0 0;
    }

    .force-width-gmail {
      min-width:600px;
      height: 0px !important;
      line-height: 1px !important;
      font-size: 1px !important;
    }

    .button-width {
      width: 228px;
    }

  </style>

  <style type="text/css" media="screen">
    @import url(http://fonts.googleapis.com/css?family=Oxygen:400,700);
  </style>

  <style type="text/css" media="screen">
    @media screen {
      /* Thanks Outlook 2013! */
      * {
        font-family: "Oxygen", "Helvetica Neue", "Arial", "sans-serif" !important;
      }
    }
  </style>

  <style type="text/css" media="only screen and (max-width: 480px)">
    /* Mobile styles */
    @media only screen and (max-width: 480px) {

      table[class*="container-for-gmail-android"] {
        min-width: 290px !important;
        width: 100% !important;
      }

      table[class="w320"] {
        width: 320px !important;
      }

      img[class="force-width-gmail"] {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
      }

      a[class="button-width"],
      a[class="button-mobile"] {
        width: 248px !important;
      }

      td[class*="mobile-header-padding-left"] {
        width: 160px !important;
        padding-left: 0 !important;
      }

      td[class*="mobile-header-padding-right"] {
        width: 160px !important;
        padding-right: 0 !important;
      }

      td[class="header-lg"] {
        font-size: 24px !important;
        padding-bottom: 5px !important;
      }

      td[class="header-md"] {
        font-size: 18px !important;
        padding-bottom: 5px !important;
      }

      td[class="content-padding"] {
        padding: 5px 0 30px !important;
      }

       td[class="button"] {
        padding: 5px !important;
      }

      td[class*="free-text"] {
        padding: 10px 18px 30px !important;
      }

      td[class="info-block"] {
        display: block !important;
        width: 280px !important;
        padding-bottom: 40px !important;
      }

      td[class="info-img"],
      img[class="info-img"] {
        width: 278px !important;
      }
    }
  </style>
</head>

<body bgcolor="#fff">
<table align="center" cellpadding="0" cellspacing="0" class="container-for-gmail-android" width="100%">
  <tr>
    <td align="left" valign="top" width="100%" style="background:repeat-x url(http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg) #ffffff;">
      <center>
        <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" background="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" style="background-color:transparent">
          <tr>
            <td width="100%" height="80" valign="top" style="text-align: center; vertical-align:middle;">
        
              <center>
                <table cellpadding="0" cellspacing="0" width="600" class="w320">
                  <tr>
                    <td class="pull-left mobile-header-padding-left" style="vertical-align: middle;">
                      <a href="" style="font-weight:bold; font-size:1.2rem;">'.$company.'<!--<img width="137" height="47" src="http://s3.amazonaws.com/swu-filepicker/0zxBZVuORSxdc9ZCqotL_logo_03.gif" alt="logo">--></a>
                    </td>
                    <td class="pull-right mobile-header-padding-right" style="color: #4d4d4d;">
                      <a href="" style="margin-right:10px;"><img width="30" height="30" src="'.$dir.'j_files/j_img/socials/facebook.png" alt="facebook" /></a>
                      <a href=""><img width="30" height="30" src="'.$dir.'j_files/j_img/socials/instagram.png" alt="instagram" /></a>
                    </td>
                  </tr>
                </table>
              </center>
             
            </td>
          </tr>
        </table>
      </center>
    </td>
  </tr>
  <tr>
    <td align="center" valign="top" width="100%" style="background-color: #fff;" class="content-padding">
      <center>
        <table cellspacing="0" cellpadding="0" width="600" class="w320">
          <tr>
            <td class="header-lg">
             <?php echo $u_subject; ?>
            </td>
          </tr>
          <tr>
            <td class="free-text">
				'.$u_message.'
            </td>
          </tr>
		  <!--
          <tr>
            <td class="button">
              <div><a class="button-mobile" href="http://"
              style="background-color:#ff6f6f;border-radius:5px;color:#ffffff;display:inline-block;font-family:'.$apos.'Cabin'.$apos.', Helvetica, Arial, sans-serif;font-size:14px;font-weight:regular;line-height:45px;text-align:center;text-decoration:none;width:155px;-webkit-text-size-adjust:none;mso-hide:all;">My Account</a></div>
            </td>
          </tr>
		  -->
        </table>
      </center>
    </td>
  </tr>
  
  <tr>
    <td align="center" valign="top" width="100%" style="background-color: #f7f7f7; height: 100px;">
      <center>
        <table cellspacing="0" cellpadding="0" width="600" class="w320">
          <tr>
            <td style="padding: 25px 0 25px">
              <strong>'.$company.'</strong><br />
              '.$company_website.' <br />
            </td>
          </tr>
        </table>
      </center>
    </td>
  </tr>
</table>
</body>
</html>
';  

$headersx  = 'MIME-Version: 1.0' . "\r\n";
$headersx .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headersx .= 'Reply-To: '.$company.' <'.$fromx.'>' . "\r\n";
$headersx .= 'From: '.$company.' <'.$fromx.'>' . "\r\n";   
mail($tox, $subjectx, $message, $headersx); 

//echo $message;
//die("$message");
 //send mail now 
/*
$to = "$u_email"; 
$toname = "";
$mailfromname = "$company";
$mailfrom = "$company_email";
$subject = "$u_subject";
$html = "$message";
$text = "$u_message";
$tag = "$company"; //$u_tag
$replyto = $mailfrom;

if(sendmailbymailgun($to,$toname,$mailfromname,$mailfrom,$subject,$html,$text,$tag,$replyto)){
    //echo "done";
}else{
   //echo("Could not send you mail. contact developer on $company_email."); 
}
*/

/*
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require_once '../PHPMailer/src/Exception.php';
require_once '../PHPMailer/src/PHPMailer.php';
require_once '../PHPMailer/src/SMTP.php';

$mail = new PHPMailer();

//$mail = new PHPMailer;
$host = "mail.$company_website";
$mail->isSMTP();                                      // Set mailer to use SMTP
$mail->Host = $host;                     // Specify main and backup server
$mail->SMTPAuth = false;                               // Enable SMTP authentication
$mail->Username = $fromx;                // SMTP username
$mail->Password = "asasasa";            // SMTP password
$mail->SMTPSecure = 'tls';                            // Enable encryption, 'ssl' also accepted
$mail->Port = 587;                                    //Set the SMTP port number - 587 for authenticated TLS
$mail->setFrom($fromx, $company);     //Set who the message is to be sent from
$mail->addReplyTo($fromx);  //Set an alternative reply-to address
$mail->addAddress($tox);  //$mail->addAddress("xxxxx@xxxxxxxx.com", "Recepient Name");       
//$mail->addAddress('ellen@example.com');               // Name is optional
//$mail->addCC('cc@example.com');
//$mail->addBCC('bcc@example.com');
//$mail->addCustomHeader( 'In-Reply-To', '<' . $in_reply_to . '>' ); 
//$mail->addCustomHeader( 'References', '<' . $in_reply_to . '>' ); 
//$mail->addCustomHeader( 'Message-ID', '<' . $message_id . '>' );
$mail->WordWrap = 50;                                 // Set word wrap to 50 characters
//$mail->addAttachment('../j_files/j_img/logo/logo.png', 'Logo'); // Optional name
$mail->isHTML(true);                                  // Set email format to HTML
$mail->Subject = $subjectx;
$mail->Body    = $message;
//$mail->AltBody = RMC($message);
//Read an HTML message body from an external file, convert referenced images to embedded,
//convert HTML into a basic plain-text alternative body
//$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));

if(!$mail->send()) {
  //echo 'Message could not be sent. Try again later.';
   //echo 'Error: ' . $mail->ErrorInfo;
   //exit;
}
*/
?>