using sendmail and ASP

Results 1 to 2 of 2

Thread: using sendmail and ASP

  1. #1
    Join Date
    Dec 1969

    Default using sendmail and ASP

    is it even possible? here&#039;s the asp i created to perform the task of allowing people to refer a friend via email:<BR>--------------------------------------------------------<BR>&#060;% <BR>&#039;------------------------------------------------------------<BR>&#039;declare variables to be pulled from form<BR>Dim strSendname, strSendemail, strFriendname, strFriendemail<BR>&#039;declare message variables<BR>Dim strbody, strSubject<BR>&#039;declare CDONTS Mail Object<BR>Dim objMail<BR>&#039;------------------------------------------------------------<BR>&#039;pull form information and place in variables<BR><BR> strSendname = Request.Form("sendname")<BR> strSendemail = Request.Form("sendemail")<BR> strFriendname = Request.Form("friendname")<BR> strFriendemail = Request.Form("friendemail")<BR> <BR> &#039;set message variable information<BR> strBody = "Dear " & strFriendname & vbcrlf & vbcrlf & "I found this website full of great NASCAR collectibles at GREAT prices." & vbcrlf & vbcrlf & "" & vbcrlf & vbcrlf & "I enjoy shopping there, and I&#039;m sure you will to." & vbcrlf & vbcrlf & "The service is incredible, and you can always enter to win free stuff, and get cash back on your purchases!" & vbcrlf & vbcrlf & "Your Friend," & vbcrlf & strsendname & " "<BR> strSubject = "Hey " & strFriendname & " check this out!"<BR>&#039;-------------------------------------------------------------<BR>&#039;generate email message using variables<BR><BR> Set objMail = CreateObject("****this is where i&#039;m lost*****")<BR> objMail.From = strSendemail<BR> objMail.Subject = strSubject<BR> objMail.Importance=1<BR> objMail.Body = strBody<BR> objMail.To = strFriendemail<BR> objMail.Send<BR>%&#062;<BR><BR>&#060;%<BR>&#039;th is operation will write the variables to a text file for logging purposes<BR>&#039;--------------------------------------------------------------<BR>&#039;set the fsoForAppend = 8 <BR>Const fsoForAppend = 8<BR>&#039;declare variable for file system object<BR>Dim objFSO<BR>&#039;set fso to embedded server command<BR>Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR>&#039;---------------------------------------------------------------<BR>&#039;Open the text file<BR>Dim objTextStream<BR>Set objTextStream = objFSO.OpenTextFile("d:/root/twinhills/", fsoForAppend)<BR>&#039;----------------------------------------------------------------<BR>&#039;write to the text file<BR>objTextStream.WriteLine strSendname<BR>objTextStream.WriteLine strSendemail<BR>objTextStream.WriteLine strfriendname<BR>objTextStream.WriteLine strfriendemail<BR>&#039;----------------------------------------------------------------<BR>&#039;Close the file and clean up<BR>objTextStream.Close<BR>Set objTextStream = Nothing<BR>Set objFSO = Nothing<BR>%&#062;<BR>---------------------------------------------------<BR>this works fine with the CDONTS object on another website, and i&#039;d love to be able to use it on our linux hosted there a way i can call the sendmail object with asp? or am i resigned to looking for a cgi script? <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: using sendmail and ASP

    Depends. If the host has the SpicePack installed (and are running ChiliSoft) then you can use their approximation of the CDONTS objects.<BR><BR>That&#039;d be my first port of call.<BR><BR>Craig.

Posting Permissions

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