Noptin_Mailer::get_headers()
Retrieves email headers.
Source Source
File: includes/class-noptin-mailer.php
public function get_headers() { $name = $this->get_from_name(); $reply_to = $this->get_reply_to(); $content = $this->get_content_type(); $headers = array( "Reply-To:$name <$reply_to>" ); $headers[] = "Content-Type:$content"; if ( ! empty( $this->mailer_data['merge_tags']['unsubscribe_url'] ) ) { $url = esc_url( $this->mailer_data['merge_tags']['unsubscribe_url'] ); $headers[] = "List-Unsubscribe:<$url>"; } $headers = implode( "\r\n", $headers ); return apply_filters( 'noptin_mailer_email_headers', $headers, $this ); }
Expand full source code Collapse full source code View on GitHub