网络邮件地址的SMTP邮件发送失败

I have SMTP mail sending function

$mail->IsSMTP();
            $mail->SMTPDebug = 0;
            $mail->SMTPAuth = TRUE;
            $mail->SMTPSecure = "ssl";
            $mail->Port = 465;
            $mail->Username = "abc@gmail.com";
            $mail->Password = "*****";
            $mail->Host = "smtp.gmail.com";
            $mail->Mailer = "smtp";
            $mail->SetFrom("abc@mjsofttech.com", 'Admin');
            $mail->AddReplyTo("abc@mjsofttech.com", 'Admin');
            $mail->AddAddress($_POST['email']);
            $mail->Subject = $subject;
            $mail->WordWrap = 80;


  $mail->MsgHTML($msg);
            $mail->IsHTML(true);
            if (!$mail->Send()) {
                $this->view->status = 'invalid';
            }

this code is working for Gmail address like xyz@gmail.com.and not working means I got message mail send successfully but lag to get the mail. it takes a long time for webmail address like xyz@company.com.but for Gmail address I will get immediately. Please help me. why does this happen? Any help would be appreciated