Your IP : 216.73.216.91


Current Path : /var/www/html/softlogicxwebsite/
Upload File :
Current File : //var/www/html/softlogicxwebsite/sendemail.php

<?php 

successEmailTemplate($_POST['username'],$_POST['useremail'],$_POST['usersubject'],$_POST['message']);

date_default_timezone_set('Asia/Karachi');

//error_log(var_export($_POST,true),3,'/email.log');

//successEmailTemplate('Abdul Moiz Baig','House#B-13,Sector 11-B, Karachi','softlogicx.com','Hi softlogicx');

function successEmailTemplate($name,$address,$subject = '',$message){

	if($subject == ''){

		$subject = 'Message received from your website';

	}

	$to = "info@softlogicx.com";

	$headers = "From: no-reply@softlogicx.com \r\n";

	$headers .= "Reply-To: no-reply@softlogicx.com\r\n";

	//$headers .= "CC: abdulmoiz.baig.work@gmail.com\r\n";

	$headers .= "BCC: abdulmoiz.baig.work@gmail.com\r\n";

	$headers .= "MIME-Version: 1.0\r\n";

	$headers .= "Content-Type: text/html; charset=UTF-8\r\n";

	$message = '<!DOCTYPE html>

<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>Meraj Sons Email</title>

  <!-- Designed by https://github.com/kaytcat -->

  <!-- Header image designed by Freepik.com -->





  <style type="text/css">

  /* Take care of image borders and formatting */



  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%;}

  table td {border-collapse: collapse;}

  .ExternalClass * {line-height: 115%;}





  /* General styling */



  td {

    font-family: Arial, sans-serif;

    color: #6f6f6f;

  }



  body {

    -webkit-font-smoothing:antialiased;

    -webkit-text-size-adjust:none;

    width: 100%;

    height: 100%;

    color: #6f6f6f;

    font-weight: 400;

    font-size: 18px;

  }





  h1 {

    margin: 10px 0;

  }



  a {

    color: #27aa90;

    text-decoration: none;

  }



  .force-full-width {

    width: 100% !important;

  }



  .force-width-80 {

    width: 80% !important;

  }





  .body-padding {

    padding: 0 75px;

  }



  .mobile-align {

    text-align: right;

  }







  </style>



  <style type="text/css" media="screen">

      @media screen {

        @import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,900);

        /* Thanks Outlook 2013! */

        * {

          font-family: \'Source Sans Pro\', \'Helvetica Neue\', \'Arial\', \'sans-serif\' !important;

        }

        .w280 {

          width: 280px !important;

        }



      }

  </style>



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

    /* Mobile styles */

    @media only screen and (max-width: 480px) {



      table[class*="w320"] {

        width: 320px !important;

      }



      td[class*="w320"] {

        width: 280px !important;

        padding-left: 20px !important;

        padding-right: 20px !important;

      }



      img[class*="w320"] {

        width: 250px !important;

        height: 67px !important;

      }



      td[class*="mobile-spacing"] {

        padding-top: 10px !important;

        padding-bottom: 10px !important;

      }



      *[class*="mobile-hide"] {

        display: none !important;

      }



      *[class*="mobile-br"] {

        font-size: 12px !important;

      }



      td[class*="mobile-w20"] {

        width: 20px !important;

      }



      img[class*="mobile-w20"] {

        width: 20px !important;

      }



      td[class*="mobile-center"] {

        text-align: center !important;

      }



      table[class*="w100p"] {

        width: 100% !important;

      }



      td[class*="activate-now"] {

        padding-right: 0 !important;

        padding-top: 20px !important;

      }



      td[class*="mobile-block"] {

        display: block !important;

      }



      td[class*="mobile-align"] {

        text-align: left !important;

      }



    }

  </style>

</head>

<body  class="body" style="padding:0; margin:0; display:block; background:#eeebeb; -webkit-text-size-adjust:none;" bgcolor="#eeebeb">

<table align="center" cellpadding="0" cellspacing="0" width="100%">

  <tr>

    <td align="center" valign="top" style="background-color:#eeebeb" width="100%">



    <center>



      <table cellspacing="0" cellpadding="0" width="600" class="w320">

        <tr>

          <td align="center" valign="top">





          <table cellspacing="0" cellpadding="0" class="force-full-width" style="background-color:#3bcdb0;">

            <tr>

              <td style="background-color:#3bcdb0;">



                <table cellspacing="0" cellpadding="0" class="force-full-width">

                  <tr>

                    <td style="font-size:40px; font-weight: 600; color: #ffffff; text-align:center;" class="mobile-spacing">

                    <div class="mobile-br">&nbsp;</div>

                      '.$subject.'

                    <br/>

                    </td>

                  </tr>

                  <!--<tr>

                    <td style="font-size:24px; text-align:center; padding: 0 75px; color: #6f6f6f;" class="w320 mobile-spacing">

                     From your website softlogicx.com

                    </td>

                  </tr>-->

                </table>



                <table cellspacing="0" cellpadding="0" width="100%">

                  <tr>

                    <td>

                      <img src="https://www.softlogicx.com/assets/images/soflogicxemail.gif" style="max-width:100%; display:block;">

                    </td>

                  </tr>

                </table>



              </td>

            </tr>

          </table>



          <table cellspacing="0" cellpadding="0" class="force-full-width" bgcolor="#ffffff" >

            <tr>

              <td style="background-color:#ffffff; padding-top: 15px;">



              <center>

                <table style="margin:0 auto;" cellspacing="0" cellpadding="0" class="force-width-80">

                  <tr>

                    <td style="text-align:left;">

                      <br>

                      <strong>Name:</strong> '.$name.'<br>

                      <strong>Email:</strong> '.$address.'<br>

                    </td>

                    <td style="text-align:right; vertical-align:top;">

                    <br>

                    <b>Date/Time</b>

                     <br>

                    '.date("F j, Y, g:i a").', Karachi, PK

                    </td>

                  </tr>

                </table>



              </center>



              <center>

                <table style="margin:0 auto; margin-top: 20px;" cellspacing="0" cellpadding="0" class="force-width-80">

                  <tr>

                    <td style="text-align:left;">

                    <strong>Message:</strong> '.$message.'

                    </td>

                  </tr>

                </table>



              </center>



            



              </td>

            </tr>

          </table>















          </td>

        </tr>

      </table>



    </center>









    </td>

  </tr>

</table>

</body>

</html>

';

	

$mail = mail($to, $subject, $message, $headers);

$response = array(

	'post' => $_POST

);



if($mail){

	$response['status'] = true;

}else{

	$response['status'] = false;

}

echo json_encode($response);



}

?>