You appear to be a bot. Output may be restricted
Description
Build and send an email with fields substituted by default
Usage
$bool = bw_send_email( $email, $subject, $message, $headers, $fields );
Parameters
- ( string ) required – email address of the recipient – overridden by the value in $fields['email'] ? not oiku_email_to then 2013/09/03
- $subject
- ( string ) optional – the one line email subject, excluding Subject:
- $message
- ( string ) optional – the body of the email
- $headers
- ( array/string ) optional – the message header: From:, Bcc:, Content-type: etc
- $fields
- ( array ) optional – name value pairs for symbolic substitution
Returns
bool the result of the wp_mail() callSource
File name: oik/includes/oik-contact-form-email.phpLines:
1 to 14 of 14
function bw_send_email( $email, $subject=null, $message=null, $headers=null, $fields=array() ) { $to = bw_array_get( $fields, 'oiku_email_to', $email ); $headers = bw_get_email_headers( $headers, $fields ); $subject = bw_get_email_subject( $subject, $fields ); $message = bw_get_email_message( $message, $fields ); $attachments = null; $result = wp_mail( $to, $subject, $message, $headers, $attachments ); bw_trace2( $result, "result of wp_mail" ); if ( !$result ) { /* translators: %1 email address %2 email subject */ BW_::p( sprintf( __( 'Failed to send email to: %1$s subject: %2$s', "oik" ), $to, $subject ) ); } return( $result ); }View on GitHub View on Trac