dim oSession
    dim strProfileInfo
    dim oMessage
    dim oRepi
    dim oMessage2
    dim oRepi2
    
    strProfileInfo="MAILSERVER" & vblf & "TEST"  '配置文件名
    Set oSession =server.CreateObject("MAPI.Session")
    oSession.Logon "","",false,True,0,True,strProfileInfo
    Set oMessage = oSession.Outbox.Messages.Add
    strSubject="Subject!"
    strText="test mail"+vblf    Set oRepi = oMessage.Recipients.Add
    oRepi.type=1
    oRepi.Name = strRecip
    oRepi.Resolve
    oMessage.subject=strSubject
    oMessage.text=strText
    if err.number <> 0 then
         'oSession.Logoff
    else
         oMessage.Send