ASP收取163系统退信

 以下是我做的ASP收取163系统退信

function shouyoujian(dizhi,mima,fuwuqi) HTMLbody="" err.clear Set pop3 = Server.CreateObject("JMail.POP3") pop3.Connect dizhi,mima,fuwuqi if not err then if pop3.count > 0 then for i=1 to pop3.count Set msg = pop3.Messages.item(i) if msg.from="[email protected]" then'关键是这个,这个是163系统退信的邮件,还可以用标题的 Set regEx = New RegExp regEx.Pattern = "To:/s+([^/s]+)" regEx.IgnoreCase = True regEx.Global = True Set Matches = regEx.Execute(msg.body) For Each Match in Matches strr = Match.SubMatches(0) Next HTMLbody=HTMLbody&i&"---"&msg.from&"<br>--------------------被退信的邮箱是:"&strr&"<br>" end if next end if end if pop3.Disconnect response.Write HTMLbody end function dizhi="[email protected]" mima="test" fuwuqi="pop3.163.com" shouyoujian dizhi,mima,fuwuqi

你可能感兴趣的:(function,regex,asp,each)