php send

xiaoxiao2021-03-01  22

function Send_Mail( $to_addr, $from_addr, $subject, $message ) { $encode = 'UTF-8'; mb_language( "Japanese" ); mb_internal_encoding($encode); $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain ; charset=utf-8' . "\r\n"; $headers .= "From: =?ISO-2022-JP?B?" . base64_encode( mb_convert_encoding( $from_addr, "ISO-2022-JP", $encode ) ) . "?=<" . $from_addr . ">"; //if ( !mb_send_mail( "<" . $to_addr . ">", $subject, mb_convert_kana( $message, "KHV" ), $headers ) ) { if ( !mail( "<" . $to_addr . ">", $subject, mb_convert_kana( $message, "KHV" ), $headers ) ) { return false; } else { return true; } } //附件 是 以html发送的带 图片的邮件

 

相关资源:无须登录SMTP服务器发邮件
转载请注明原文地址: https://www.6miu.com/read-4150265.html

最新回复(0)