sending mail with ASP

Results 1 to 3 of 3

Thread: sending mail with ASP

  1. #1
    Join Date
    Dec 1969

    Default sending mail with ASP

    Hi!<BR><BR>I am trying to send e-mail from an ASP application. Does anybody know how to do this?<BR><BR>Thanks,<BR>Anna

  2. #2
    Join Date
    Dec 1969

    Default RE: sending mail with ASP

    If you have your smtp server set up properly in IIS 4.0 then you can use the CDONTS "NewMail" object. Here is a sample code:<BR> <BR> Dim objCDO<BR> Set objCDO = Server.CreateObject("CDONTS.NewMail")<BR> <BR> objCDO.To = " "<BR> objCDO.From = ""<BR> objCDO.BodyFormat = 0 &#039makes email format html<BR> objCDO.MailFormat = 0 &#039makes email format html<BR> objCDO.Value("From") = "this is a mask name"<BR> objCDO.Value("Reply-To") = ""<BR> <BR> Dim txtBody<BR> txtBody = "This is the body of the message"<BR> <BR> Dim SubjectLine<BR> SubjectLine = "SubjectLine" <BR> objCDO.Subject = SubjectLine<BR> objCDO.Body = txtBody<BR> objCDO.Send<BR> <BR> Set objCDO = Nothing<BR>

  3. #3
    Somnath Dhar Guest

    Default RE: sending mail with ASP

    You can use the folow codes written in JSCRIPT.<BR>To run this code you have to have SMTP server on in Nt ser server.<BR><BR>Good luck<BR><BR><BR> Mail = Server.CreateObject("CDONTS.NewMail") <BR> var From ="logonHealth("<BR> <BR> Mail.To= ""<BR> Mail.From= ""<BR> Mail.Subject= "Subject" <BR> <BR> Mail.Body= "text of Body"<BR> <BR> Mail.Importance = 2 //High importance!<BR><BR> Mail.Send(From,To,Subject,Body) SMTP mail, Please check <BR> <BR> Mail = null // can&#039t reuse it for another message <BR> <BR> <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts