Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/295.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php codeigniter以垃圾邮件的形式发送邮件_Php_Codeigniter_Email_Co - Fatal编程技术网

Php codeigniter以垃圾邮件的形式发送邮件

Php codeigniter以垃圾邮件的形式发送邮件,php,codeigniter,email,co,Php,Codeigniter,Email,Co,我正在使用以下代码发送邮件 但是发送的邮件都是垃圾邮件。如何以编程方式将它们标记为非垃圾邮件 $this->load->library('email'); if($this->config->item('protocol')=="smtp"){ $config['protocol'] = 'smtp'; $config['smtp_host'] = $this->config->item('smtp_host

我正在使用以下代码发送邮件

但是发送的邮件都是垃圾邮件。如何以编程方式将它们标记为非垃圾邮件

$this->load->library('email');

 if($this->config->item('protocol')=="smtp"){
            $config['protocol'] = 'smtp';
            $config['smtp_host'] = $this->config->item('smtp_hostname');
            $config['smtp_user'] = $this->config->item('smtp_username');
            $config['smtp_pass'] = $this->config->item('smtp_password');
            $config['smtp_port'] = $this->config->item('smtp_port');
            $config['smtp_timeout'] = $this->config->item('smtp_timeout');
            $config['mailtype'] = $this->config->item('smtp_mailtype');
            $config['starttls']  = $this->config->item('starttls');
             $config['newline']  = $this->config->item('newline');

            $this->email->initialize($config);
        }
            $fromemail='jodbaki@gmail.com';
            $fromname='Jod Baki';
            $subject=$this->config->item('activation_subject');
            $message=$this->config->item('activation_message');;

            $message=str_replace('[verilink]',$verilink,$message);

            $toemail=$this->input->post('email');

            $this->email->to($toemail);
            $this->email->from($fromemail, $fromname);
            $this->email->subject($subject);
            $this->email->message($message);
            if(!$this->email->send()){
             print_r($this->email->print_debugger());
            exit;
            }
我正在发送以下信息

Hi,
 Thank you for registering with us. Please click below link to verify your
email address.
 <a href='http://jodbaki.com/exam/?/login/verify/'>Click Here</a>
 or
     Copy below link and visit in browser
 http://jodbaki.com/exam/?/login/verify/

 Thanks
你好,
感谢您在我们注册。请单击下面的链接以验证您的
电子邮件地址。
或
复制下面的链接并在浏览器中访问
http://jodbaki.com/exam/?/login/verify/
谢谢

电子邮件服务负责查明您是否在发送垃圾邮件。它与您的代码或codeigniter无关

尝试在有效域下创建电子邮件,并防止发送类似垃圾邮件的邮件内容

以下是一篇避免您的电子邮件成为垃圾邮件的文章,如:


您必须过滤
$mesage
的值您好,感谢您向我们注册。请单击下面的链接以验证您的电子邮件地址。\>单击此处或复制下面的链接并在浏览器中访问,谢谢。这就是我要传达的简单信息