コード例 #1
0
     }
     $ctf_geekMail->from($this->si_contact_from_email, $this->si_contact_from_name);
     $ctf_geekMail->to($mail_to);
     if ($si_contact_opt['email_reply_to'] != '') {
         // custom reply_to
         $ctf_geekMail->_replyTo($si_contact_opt['email_reply_to']);
     } else {
         if ($email != '') {
             // trying this: keep users reply to even when email_from_enforced
             $ctf_geekMail->_replyTo($email);
         } else {
             $ctf_geekMail->_replyTo($this->si_contact_from_email);
         }
     }
     if ($ctf_email_address_bcc != '') {
         $ctf_geekMail->bcc($ctf_email_address_bcc);
     }
     $ctf_geekMail->subject($subj);
     $ctf_geekMail->message($msg);
     if ($this->uploaded_files) {
         foreach ($this->uploaded_files as $path) {
             $ctf_geekMail->attach($path);
         }
     }
     @$ctf_geekMail->send();
 } else {
     // sending with wp_mail
     add_filter('wp_mail_from', array(&$this, 'si_contact_form_from_email'), 1);
     add_filter('wp_mail_from_name', array(&$this, 'si_contact_form_from_name'), 1);
     if ($ctf_email_on_this_domain != '') {
         // Add an action on phpmailer_init to add Sender $this->si_contact_mail_sender for Return-path in wp_mail