Hey Guys,<BR> Can anyone looks this function and tell me why it might send an email twice? Thanks<BR><BR>It gets called from here<BR><BR>case "2" &#039;Email <BR> oDataHelper.CDONTSSendMail iOrder<BR><BR>Public Function CDONTSSendMail(iOrder)<BR><BR> Dim oCDOMail &#039;Holds the CDONTS e-mail object<BR> Dim oRs, sSQL<BR> sSQL = "SELECT tOrder.OrderID, tOrder.RequestDate, tProspect.Contact, tProspect.ProjectName," &_<BR> " tProspect.Email" & _<BR> " FROM tProspect INNER JOIN (tOrder INNER JOIN tOrderProspect ON tOrder.OrderID =" & _<BR> " tOrderProspect.OrderID) ON tProspect.ProspectID = tOrderProspect.ProspectID" & _<BR> " WHERE (((tOrder.OrderID)=" & iOrder & "));"<BR> &#039;Create the e-mail server object<BR> Set oCDOMail = Server.CreateObject("CDONTS.NewMail")<BR> Set oRs = Server.CreateObject("ADODB.Recordset")<BR> oRs.CursorLocation = adUseClient<BR> oRs.Open sSQL,oCon<BR> <BR> &#039;Who the e-mail is from<BR> oCDOMail.From = "info@caststone.net"<BR> While Not oRs.EOF<BR> &#039;Who the e-mail is sent to<BR> oCDOMail.To = oRs.Fields("Email")<BR> <BR> &#039;The subject of the e-mail<BR> oCDOMail.Subject = "Quote Request Info from Continental Cast Stone"<BR> <BR> &#039;The main body of the e-amil<BR> oCDOMail.Body = "Attn: " & oRs.Fields("Contact") & "," & vbCrLf & _<BR> "You can get the results of your quote by clicking http://www.caststone.net/designer/quote.asp?Order=" & iOrder & "." & vbCrLf<BR> oRs.MoveNext<BR> Wend <BR> &#039;Set the mail format (0=MIME 1=Text)<BR> oCDOMail.MailFormat = 0<BR> <BR> &#039;Importance of the e-mail (0=Low, 1=Normal, 2=High)<BR> oCDOMail.Importance = 1 <BR> <BR> &#039;Send the e-mail<BR> oCDOMail.Send <BR> <BR> &#039;Close the server mail object<BR> Set oCDOMail = Nothing<BR> <BR> &#039;Return the function as true<BR> &#039;CDONTSSendMail = True<BR><BR> End Function