09/10/2018, 17:42
[Q] Hoi ve cach lam guessbook
Nay may bo! Tui dang thu lam web Nhung tui ko biet lam cach nao de "xin" y kien cua nguoi truy cap (Lam guessbook) de cho khi ho "Submit" thi se co thong tin gui theo duong email toi cho tui!
Ai biet thi help me voi nhe!
Cam on nhieu!
Ai biet thi help me voi nhe!
Cam on nhieu!
Bài liên quan
strNoiDung = Request.Form("NoiDung")
Sau khi đã inssert vào CSDL rồi, bạn tiến hành gửi mail như bình thường thôi
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
'Email sẽ được gửi từ ai?
objCDOMail.From = strTenBan & "<" & strEmailCuaBan & ">"
'Mail sẽ được gửi đến địa chỉ nào?
objCDOMail.To = "địa chỉ mail của bạn muốn gửi về"
'Thư của bạn gửi đi sẽ có định dạng chỉ là chữ hay có mã HTML
objCDOMail.BodyFormat = 0 ' Nếu = 0 định dạng sẽ là HTML và ngược lại = 1 là chữ
'Dạng của mail gửi đi (= 0 là MIME, = 1 là chữ)
objCDOMail.MailFormat = 0
'Gửi thư với Tiêu đề nào?
objCDOMail.Subject = strTieuDeThu
'Nội dung của mail sẽ là gì?
objCDOMail.Body = strNoiDung
'Cách thức gửi thư ra sao?
'= 0 - Gửi chậm
'= 1 - Gửi bình thường
'= 2 - Gửi bảo đảm
objCDOMail.Importance = 1
'Bắt đầu gửi thư đi
objCDOMail.Send
'Huỷ đối tượng CDONTS
Set objCDOMail = Nothing
Vả lại guestbook dịch nôm na là sổ lưu niệm chứ còn gửi thẳng về thư nhà mình thì là góp ý theo kiểu contact rồi.
Nếu là PHP thì thử cái VGuestBuk xem
My Web
http://www.aspvn.net/Home/ThuVien.asp
và xem hướng dẫn ở đây
http://www.aspvn.net/Home/ChuDe.asp?TOPIC_ID=240
Mail box: ng_phuc2002@yahoo.com
the ACTION attribute of the <FORM> tag has been associated with a CGI script located on a web server. But, in fact, any URL can be assigned to the ACTION attribute. Doing so , however, has little value unless the resource associated with the URL can process the contents of the form in some way. That having said, there is one type of URL - apart from a CGI script- that can process the results of a form in a meaningful way- mailto: . For example, if you included the following <FROM> tag on a page, clicking on the submit button would e-mail the contents of the form to my e-mail address:
<FORM METHOD="POST" ACTION="mailto:wtatters@world.net>
......
NOTE: Using the ACTION="mailto:e-mail_address" option relies on the fact that the web user has properly configureed his or her web browser to send e-mail. If this has not been done, no e-mail massage is transmited.
cái này là mình quote lại trong sách chứ cũng chưa thử qua, nếu bạn nào có dùng qua cách này rồi thì xin post lên cho mình biết kếy quả ra sao. thanks.