passing paremeters from PHP Email piping

妖精的绣舞 提交于 2019-12-06 16:19:09

You can parse address lines with imap_rfc822_parse_adrlistDocs or mailparse_rfc822_parse_addressesDocs.

To parse the body of the email message, you can make use of the Mail Parse extensionDocs:

$buffer = [...] // Mail Content from Pipe

$mail = mailparse_msg_create();
mailparse_msg_parse($mail, $buffer);
$struct = mailparse_msg_get_structure($mail); 

foreach ($struct as $st) { 
    $section = mailparse_msg_get_part($mail, $st); 
    $info    = mailparse_msg_get_part_data($section); 

    print_r($info);
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!