ASP and email

Results 1 to 3 of 3

Thread: ASP and email

  1. #1
    Erin Guest

    Default ASP and email

    I have a form that is sending information to a database and is returning an email with the primary key from that access database. The problem is that I only get an email back about 75% of the time. The information from the form goes into the database 100% of the time. I never get any errors. Could this be an ASP problem or a network problem? <BR>Please HELP <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP and email

    Do you have any If condition involved in the code something like, "If this happens then send the mail" or the like of that ?<BR>show some code if possible.

  3. #3
    Erin Guest

    Default RE: ASP and email

    &#060;%<BR> Function ParseBody(strText)<BR> <BR> strText = Replace(strText, Chr(13), "<BR>")<BR> <BR> ParseBody = strText<BR> <BR> End Function<BR><BR> &#039;SET UP DATABASE CONNECTION<BR> Dim objConn<BR> Set objConn = Server.CreateObject("ADODB.Connection")<BR> objConn.Open "dsn=TO"<BR><BR> <BR> &#039;DECLARE RECORDSET FOR ADD<BR> Dim objRS<BR> Set objRS = Server.CreateObject("ADODB.Recordset")<BR> objRS.Open "TO", objConn, adOpenKeySet, adLockOptimistic, adCmdTable<BR><BR> objRS.AddNew<BR> objRS("STR_FROM_ORG") = Request.Form("FromORG")<BR> objRS("STR_To_ORG") = Request.Form("ToORG")<BR> objRS("STR_From_Working_Title") = Request.Form("FromWorkingTitle")<BR> objRS("STR_To_Working_Title") = Request.Form("ToWorkingTitle")<BR> objRS("STR_From_Classification") = Request.Form("FromClassification")<BR> objRS("STR_To_Classification") = Request.Form("ToClassification")<BR> objRS("STR_From_Employee_Name") = Request.Form("FromEmployeeName")<BR> objRS("STR_To_Employee_Name") = Request.Form("ToEmployeeName")<BR> objRS("STR_From_Class") = Request.Form("FromClass")<BR> objRS("STR_To_Class") = Request.Form("ToClass")<BR> objRS("STR_From_Fund") = Request.Form("FromFund")<BR> objRS("STR_To_Fund") = Request.Form("ToFund")<BR> objRS("STR_From_Code") = Request.Form("FromCode")<BR> objRS("STR_To_Code") = Request.Form("ToCode")<BR> objRS("STR_From_Full_or_Part") = Request.Form("FromFullorPart")<BR> objRS("STR_To_Full_or_Part") = Request.Form("ToFullorPart")<BR> objRS("STR_From_Position") = Request.Form("FromPosition")<BR> objRS("STR_To_Position") = Request.Form("ToPosition")<BR> objRS("STR_From_Add_Position") = Request.Form("FromAddPosition")<BR> objRS("STR_To_Add_Position") = Request.Form("ToAddPosition")<BR> objRS("STR_SUBMITTED_BY") = Request.Form("SubmittedBy")<BR> objRS("DTM_Date_of_TO_Used") = Request.Form("DateofToUsed")<BR> objRS("STR_Approved_By") = Request.Form("ApprovedBy")<BR> objRS("STR_Assistant_Director") = Request.Form("AssistantDirector")<BR> objRS("DTM_Date_Submitted_TO_HR") = Request.Form("DateSubmittedtoHR")<BR> objRS("STR_Email_Address") = Request.Form("EmailAddress")<BR> objRS("DTM_Time_Stamp") = Request.Form("TimeStamp")<BR> objRS.Update<BR> <BR> Dim strID<BR> strID=objRS("ID")<BR> <BR> &#039;Close the connection<BR> objRS.Close<BR> Set objRS = Nothing<BR> objConn.Close<BR> Set objConn = Nothing <BR> &#039;******************************************** ********************************<BR> &#039;Email<BR> &#039;******************************************** ********************************<BR> Dim myCDONTSMail<BR> Dim strTo<BR> Dim strFrom<BR> Dim strSubject<BR> Dim strBody<BR> Dim strsubby <BR> <BR>strsubby= Request.Form("SubmittedBy")<BR>strTo= Request.Form("EmailAddress")<BR>strFrom= strsubby<BR>strSubject = "Table of Organization Change Form"<BR>strBody = strsubby &", has submitted a Table of Organization Form:" & vbcrlf & "ID #: = " & strID & vbcrlf & "Please go to HTTP://jfsstage/JFSSTAGE/TO/searchid.asp and enter the ID Number above for this Request." <BR><BR> <BR> &#039;Create a new mail message object<BR>Set myCDONTSMail = CreateObject("CDONTS.NewMail")<BR><BR>&#039;Sent the new mail message object by passing the parameters<BR>&#039;defined above<BR>myCDONTSMail.Send strFrom,strTo,strSubject,strBody<BR>&#039;Set the new mail message object to Nothing to free resources<BR>Set myCDONTSMail = Nothing<BR>%&#062;

Posting Permissions

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