Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
The "SendUsing" configuration value is invalid.
Old 03-31-2006, 01:14 AM The "SendUsing" configuration value is invalid.
Average Talker

Posts: 26
Trades: 0
Hi guys,
My program does upload file(s) on server and also should send an email to say file has been uploaded, but this part (email part) doesn't work and I am getting error which says:


CDO.Message.1 error '80040220'
The "SendUsing" configuration value is invalid. /upload2.asp, line 588

Can you please help me what I am doing wrong.

Thanks,
Elham

I am just sending the ASP part not whole HTML

----------- 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")
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
%>
elham is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-31-2006, 06:24 AM Re: The "SendUsing" configuration value is invalid.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
you have not configured the SendUsing value so it will be blank.

http://www.codeproject.com/asp/cdoex.asp
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-31-2006, 01:29 PM Re: The "SendUsing" configuration value is invalid.
Average Talker

Posts: 26
Trades: 0
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
%>
elham is offline
Reply With Quote
View Public Profile
 
Old 03-31-2006, 02:06 PM Re: The "SendUsing" configuration value is invalid.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
you need to set the various fields in the configuration

this is an unfinished article on CDOSYS on my test site so unlinked, but you can download and follow the code

http://www.cands.dnsalias.com/articles/code/asp/send-email/cdosys/

and the constants file is at

http://www.candsdesign.co.uk/article...cdo-constants/
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to The "SendUsing" configuration value is invalid.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15125 seconds with 12 queries