CDONTS supports the following method: <% set mymail = creteObject ("cdonts.newmail") mymail.from = *** 'Letter sender mailbox mymail.to = ***' Letter recipient mailbox mymail.cc = *** 'Crifically MyMail.bcc = ***' Delivery MYMAIL.SUBJECT = *** 'Letter Theme MyMail.Body = ***' Letter Text 'Setting Priority, 0- Not Important, 1- General, 2- Important . Mymail.importance = 2mymail.sendSet mymail = Nothing%> Note: *** String may be you write, or it may be taken from your form, use the request method. In short, use it according to your intention. Check if you have an SMTP service installed. Option Pack defaults to include SMTP services. After the SMTP service is installed, there will be a file called CDONTS.DLL in your system32 directory. If you don't know if your site is supported, just download the Webmail program of this site, upload to your site test, if there is no error, it is description. If there is a "can't create objection" error, then I think that the site that opens ASP privileges must be supported. If not supported, it means that the administrator is too lazy.
How to use the CDONTS component to send HTML-based letters? <% Set mymail2 = createObject ("cdonts.newmail") html = "" html = html & "
" html = html & " "html = html &" this is a test mail in html
"HTML = HTML &" Mail Content Here ... font> p> "html = html &" body> "html = html &" html> "mymail2.from =" Somebody @ somewhere.com "MyMail2.To =" nobody@somewhere.com "MyMail2.Subject =" Test mail in HTML "MyMail2.BodyFormat = 0 MyMail2.MailFormat = 0MyMail2.Body = HTMLMyMail2.Sendset MyMail2 = nothing%> in short, The standard HTML write is.
How do I use the CDONTS component to send a letter? <% Set MyMail3 = CreateObject ( "CDONTS.NewMail") MyMail3.From = "somebody@nowhere.com" MyMail3.To = "nobody@nowhere.com" MyMail3.Cc = "nobody2@nowhere.com" MyMail3.Subject = "This is a test" mycdontsmail3.attachfile server.mappath ("c: /inetpub/wwrow/somedirectory/anyfile.txt")
MyBody2 = "Thank you!" & VbCrLfMyBody2 = MyBody2 & "Your information will be send to me!" & VbCrLfMyBody2 = MyBody2 & "Welcome in http://java2000.126.com!" MyMail3.Body = MyBody2MyMail3.Sendset MyMail3 = Nothing%>