body_parser()
public static method
Tries to fetch the plain-text version when available first. Otherwise, will
fallback to the HTML version.
public static body_parser ( resource $imap, integer $i, boolean $reply = true ) : mixed |
$imap |
resource |
The current IMAP connection |
$i |
integer |
The current email message number |
$reply |
boolean |
If we're parsing a reply or not. Default set to true. |
return |
mixed |
Either the email body on success or false on failure |
multipart_plain_text_parser()
public static method
Used during {@link BP_Reply_By_Email_IMAP::body_parser()} if email is a multipart email.
This method parses a multipart email to return the plain-text body as well as the encoding
type and other parameters on success.
public static multipart_plain_text_parser ( obj $parts, resource $imap, integer $i, boolean $subpart = false ) : array |
$parts |
obj |
The multiple parts of an email. See imap_fetchstructure() for more details. |
$imap |
resource |
The current IMAP connection |
$i |
integer |
The current email message number |
$subpart |
boolean |
If we're parsing a subpart or not. Defaults to false. |
return |
array |
A populated array containing the body, encoding type and other parameters on success. Empty array on failure. |