繁体   English   中英

电子邮件仅以gmail邮件ID接收。无法以其他邮件传递

[英]Email only receive in gmail mail id's .Cannot deliver in others

    $to_email = "suraj@gmail.com,rajeesh@paarva.com,arun@paarva.com,arunrmt@gmail.com";
    $fname = $this->input->post('fname');
    $lname = $this->input->post('lname');
    $email = $this->input->post('email');
    $mobile = $this->input->post('mobile');
    $msg = $this->input->post('msg');
    $this->email->set_mailtype("html");


    $config = Array(        
        'protocol' => 'sendmail',
       'mailtype'  => 'html', 
        'charset'   => 'iso-8859-1'
    );
    $this->load->library('email',$config);
    $this->email->from($from_email, $fname);
    $this->email->to($to_email);
    $this->email->subject('Contact enquiry' . ' ' . $fname . ' ' . $mobile);

    $email_body = "<table style='width:700px;border:1px #e5e5e5 solid;background:#f5f5f5;color:#000000;padding:7px;'><tbody><tr><td style='width:120px;padding-left:3px;border:1px #FFFFFF solid;background:#f15722;color:#FFF;'><strong>Name:</strong></td><td style='border:1px #e5e5e5 solid; padding:5px;background:#FFFFFF;color:#000000;'>" . $fname . "." . $lname . "</td></tr><tr><td style='width:120px;padding-left:3px;border:1px #FFFFFF solid;background:#f15722;color:#FFF;'><strong>Phone:</strong></td><td style='border:1px #e5e5e5 solid; padding:5px;background:#FFFFFF;color:#000000;'>".$mobile."</td></tr><tr><td style='width:120px;padding-left:3px;border:1px #FFFFFF solid;background:#f15722;color:#FFF;'><strong>Email Id:</strong></td><td style='border:1px #e5e5e5 solid; padding:5px;background:#FFFFFF;color:#000000;'>".$email."</td></tr><tr><td style='width:120px;padding-left:3px;border:1px #FFFFFF solid;background:#f15722;color:#FFF;'><strong>Message:</strong></td><td style='border:1px #e5e5e5 solid;padding:7px;background:#FFFFFF;color:#000000;line-height:19px;'>".$msg."</td></tr></tbody></table>"; 
    $body = str_replace("\n", "<br/>", "$email_body");
    $this->email->message($email_body);


    if ($this->email->send()) {
        //echo $body;
        echo 'Email sent successfully'; 
    } else {
        echo 'Error in sending Email';
    }
}

电子邮件仅发送到gmail ID,例如:suraj @ gmail.com,arunmt @ gmail.com。 并且邮件不会收到像rajeesh @ paarva.com,ajeeb @ paarva.com这样的电子邮件ID。 请帮我

尝试这个

            $this->email->initialize(array(
              'protocol' => protocol,
              'smtp_host' => host,
              'smtp_user' => user,
              'smtp_pass' => password,
              'smtp_port' => smtp port,
              'crlf' => "\r\n",
              'newline' => "\r\n"
            ));

            $this->email->email, 'eJobs');
            $this->email->to(email);
            $this->email->subject('subject');
            $this->email->message("you're message");
            $this->email->send();

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM