VBScript mb_send_mail function

A VBScript equivalent of PHP’s mb_send_mail


function mb_send_mail( strto, subject, message, from, strFile )

    Dim basp
    Dim msg

    if inStr(subject,vbCrLf) then
        Response.Write "題名に改行を含めることはできません。"
        Response.End
    end if

	Set basp = Server.CreateObject("basp21")
	msg = basp.SendMail(SMTP_SERVER, strto, from, subject, message, strFile)

    mb_send_mail = msg

end function

Please also note that php.vbs offers community built functions and goes by the McDonald’s Theory. We’ll put online functions that are far from perfect, in the hopes to spark better contributions. Do you have one? Then please just:

Other PHP functions in the mbstring extension