<?php
session_start();
$to = 'velmuruganmca35@gmail.com';
$companyname=$_SESSION['companyname'];
$contactname="Rajesh";
$coversation="<b>Call:</b> Conversation: Interested, called Diesh at 1:57am <br>";
$coversation.="<b>Note:</b> Call No Response";
$subject = $companyname." added a call in Fieldcloud Sales";
$htmlContent = '
    <html>
    <head>
        <title></title>
    </head>
    <body style="background-color:#f4f4f4;    padding: 20px;">
        <center>
        <div style="max-width:600px;padding-bottom:30px;">
        <div style="float:right;color:grey;"><b>FieldCloud Sales</b></div></div>
        <div style="max-width:600px;height:100%;">
            <div style="background-color: #ffffff;border-top: 1px solid #ff9300;border-bottom: 1px solid #ff9300;padding: 20px;border-collapse: collapse;text-align: left;">
                <b><span style="color:#ffa200">✔</span>'.$companyname.'  added a call to:</b><br><br><a style="color:##26abe2;text-decoration: underline;cursor:pointer;" href="http://fieldcloud.in/Sales/">'.$contactname.'</a><br>'.$coversation.'
            </div>
            <div style="text-align:left;font-size:10px;color:grey;">Note: You were sent this email because CCL L. wanted to let you know the call was added.</div>
        </div>
        </center>
    </body>
    </html>';

// Set content-type header for sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

// Additional headers
$headers .= 'From: b2lmobitechpvtltd@gmail.com' . "\r\n";
$headers .= 'Cc: velemailid@gmail.com' . "\r\n";
$headers .= 'Bcc: velmurugan9cs24@gmail.com' . "\r\n";

// Send email

if(mail($to,$subject,$htmlContent,$headers)){
    $successMsg = 'Email has sent successfully.';
}else{
    $errorMsg = 'Email sending fail.';
}
?>
hi