Chào các bạn, mình có 1 đoạn code viết trên ASP:
<%
Set objMail =CreateObject("CDONTS.NewMail")
objMail.From="ptduat@yahoo.com"
objMail.To="ptduat@yahoo.com"
objMail.Subject="anonSubj"
objMail.Body="anonBody"
objMail.Send
%>
xong mình gửi lên Webserver (cài Win 2000 advanced server) chạy thử nhưng toàn bị báo lỗi: HTTP 500 - Internal server error Internet Explorer, mình chưa biết đó là lỗi gì. Nếu bạn nào biết xin hãy chỉ giùm. Mình cám ơn nhiều!
PTDuat
Hồi âm:
Xin chao PTDuat! In IE, turn off Friendly HTTP error messages by choosing Tools - Internet Options - Advanced. Then you should get the real error message and line number of the error.
Neu ban co thac mac them thi de cau hoi tren VnExpress hoac email cho minh: qle@aamescorp.com hoac quocle90@hotmail.com.
Quoc
Thu vien CDONTS - Collaboration Data Objects chi danh cho NT Server, no den voi the NT Option Pack, cung cap day du cac van ban de chuyen giao va nhan thu tu qua SMTP. Them mot dieu nua la o day co mot thu vien khac duoc goi la CDO, voi thu vien nay se cung cap that doi dao nhung dieu kien lua chon, va no den voi the Microsoft Exchange Server. Thu vien CDONTS duoc dung rat don gian, va ban co the gui mail trong vai duong code sau day:Create myMail - a NewMail object: Set myMail = Server.CreateObject("CDONTS.NewMail")
myMail.To = "ptduat@yahoo.com"
myMail.Body = "Hello Luat, how come you're using yahoo mail service?"
myMail.From = Billgates@microsoft.com (dia chi thi du)
myMail.Subject = "I hope to see you soon"
myMail.BodyFormat=0
Add a file attachment: Call myMail.AttachFile("\\server\Luat_images\Luat.jpg", "Luat.JPG")
myMail.Send
Set myMail=nothing Chuc ban vui ve! Phucusa