Email with ASP

zhaozj2021-02-17  48

Email with ASP <% Dim strTo, strSubject, strBody 'Strings for recipient, subject, bobyDim objCDOMail' The CDO object'First we'll read in the values ​​enteredstrTo = Request.Form ( "to") 'These would read the Message Subject and Body If We let you enter it'sTRSUBJECT = Request.form ("Subject") 'strBody = Request.form ("body") strsubject = "Sample E-mail Sent from X-bit!"' this is multi -lined simply for readabilitystrBody = "This message was sent from a sample at X-Bit." strBody = strBody & "It is used to show people how to send e-mail from an" strBody = strBody & "Active Server Page. If you did not request this "strBody = strBody &" e-mail yourself, your address was entered by one of "strBody = strBody &" our visitors. We do not store these e-mail addresses. "strBody = strBody &" Please address All converns to pplo@sina.com. "

'Ok We've Got The VALUES NOW ON To The Point of the Script.

'We just check to see if someone has entered anything into the to field.'If it's equal to nothing we show the form, otherwise we send the message.'If you were doing this for real you might want to check other fields too' And do a little entry validation like etc .if Strto = "" THEN>

Enter Your E-mail address:


Message: