Reply
The "SendUsing" configuration value is invalid.
Old 03-31-2006, 12: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
 
 
When You Register, These Ads Go Away!
Old 03-31-2006, 05:24 AM Re: The "SendUsing" configuration value is invalid.
chrishirst's Avatar
Super Moderator

Posts: 26,420
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!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | Crowded Nightclub? | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-31-2006, 12: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, 01:06 PM Re: The "SendUsing" configuration value is invalid.
chrishirst's Avatar
Super Moderator

Posts: 26,420
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!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | Crowded Nightclub? | Bits & Bobs
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.10513 seconds with 13 queries