Viewing 1 replies (of 1 total)
  • Hi ellenbo,
    I had the same issue (also using Wp-Mail-SMTP) and the only way I see so far is to edit the core files. Based only on the conversation you mentioned, I have edited /wp-content/plugins/simple-subscribe/libs/SimpleSubscribe/Email.php and changed the sendEmail function to the below.

    The next version of the plugin should automatically overwrite this.

    Pascal.

    private function sendEmail($recipients = array(), $subject = '', $data)
        {
            // recipients check
            if(!is_array($recipients)){ $recipients = array($recipients); }
            if(count($recipients) < 1){
                throw new EmailException('No subscribers provided. (possibly none in your system)');
            }
            // try sending e-mail
            try{
    
                // set HTML / or plaintext body
                if($this->htmlEmail == TRUE){
                    $headers = array('Content-Type: text/html; charset=UTF-8');
                } else {
                    $headers = array('Content-Type: text/plain; charset=UTF-8');
                }
    
                // Send the mail
                wp_mail( $recipients, $subject, $this->getEmailTemplate($data), $headers);
            } catch(\Exception $e){
                throw new EmailException($e->getMessage());
            }
        }
Viewing 1 replies (of 1 total)
  • The topic ‘SMTP support without editing core plugin files’ is closed to new replies.