Thanks for the big help. As you said I added :
Set iConf = Server.CreateObject("CDO.Configuration")
Set MyMail.Configuration = iConf
to the code but still I have same error please see my code
Where still Ia m doing wrong?
Thanks,
Elham
-------------------- code------------------
<% Server.ScriptTimeout = 999 %>
<%
Set Upload = Server.CreateObject ("Persits.Upload.1")
Count = Upload.SaveVirtual ("/data/client/")
%>
<% = Count %>
file(s) uploaded sucessfully to the server.<BR><BR>
Uploaded File(s) details:<BR>
----------------------------------<br>
<%
For Each File in Upload.Files
lastSlashPos = InStrRev(File.Path, "\", -1, 1)
If lastSlashPos < 1 then
lastSlashPos = 1
End If
fileName = Mid(File.Path, lastSlashPos )
Response.Write File.Name & " = " & fileName & "<BR>"
Response.Write "FILE SIZE = " & File.Size &" Bytes<BR><BR>"
Next
%>
<%
' FROM info : Get the user fields from the page before. As an example I put two fields here : fromName and fromEmail
fromName= Upload.Form("fromName")
fromEmail= Upload.Form("fromEmail")
response.write("<hr>")
' TO info : Who is this being emailed to goes here
toEmail= "
eshahnam@spirotechnology.com"
' SUBJECT info : Whats the email subject?
toSubject= "Here is an email with attachment from "&fromName
' BODY info : What info that user filled in do we want to send?
toHTMLBody= "Hello.<br>" &_
" This is an email from "&fromName&". Here is more info :<Br/>"&_
" Email : "&fromEmail
'LET USER KNOW EMAIL WAS SENT SUCCESSFULY :
aftersuccessfulemail = " Dear "&fromNAme&", <Br><br>"&_
" Thank you for sending your info <br>"&_
" This is what we sent via email to :<b>"&toEmail&"</b><br>"&_
" From : <b>"&fromName&" ("&fromEmail&")</b><br>"
'
response.write(aftersuccessfulemail)
'BUILD EMAIL : Process the info gathered and send the user an email with attachment and fields
' PROCESS fromEmail
if trim(fromEmail)<>"" and trim(toEmail)<>"" then
Dim MyMail
Set MyMail = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set MyMail.Configuration = iConf
MyMail.From = fromEmail
MyMail.To = toEmail
end if
' PROCESS toSubject
if trim(toSubject) <>"" then
MyMail.Subject = toSubject
end if
' PROCESS toHTMLBody
if trim(toHTMLBody) <>"" and toTEXTBody ="" then
MyMail.HTMLBody = toHTMLBody
end if
' PROCESS ALL
MyMail.Fields.Update()
' SEND email
MyMail.Send()
' RESET everything
Set MyMail = Nothing
%>