I started to post this under the post that already states "email code" but i decided to post this separately--being that I'm not sure what it is he was/is trying to do and we could be asking about two different things. But if not, maybe this will help him too.
So, I'm trying to have an email sent to certain ppl when a new form is created on my page. Everything seems to be working fine, but when I hit submit I get this error regarding my e-mail object...
Error Type:
CDO.Message.1 (0x80040220)
The "SendUsing" configuration value is invalid.
/testecp1/postModify1.asp, line 142
I'd be getting the same msg on my other page that sends an email when a new form is created but I commented it out. This is what I have:
[...code...]PostNew1.asp[...code...]
pRS.open "INSERT INTO ecpForms (ecpNumber, ecpTitle, ecpFilename, ecpOriginator, ecpDateDistributed, ecpDateDue) VALUES ('" & pEcpNumber & "', '" & pEcpTitle & "', '" & pEcpFilename & "', '" & pEcpOriginator & "', '" & pEcpDateDistributed & "', '" & pEcpDateDue & "') ", pConnection
response.write "Success. File saved to " & o.FileFullPath
emailMessage = "Do not reply. This is an automatic email." & Chr(13)
emailMessage = emailMessage & "ECP Number: " & pEcpNumber & Chr(13)
emailMessage = emailMessage & "ECP Title: " & pEcpTitle & Chr(13) & Chr(13)
emailMessage = emailMessage & "New ECP form just posted on forum." & Chr(13) & Chr(13)
emailMessage = emailMessage & "Check details on https.com"
Set objMail = Server.CreateObject("CDO.Message")
objMail.From = Session("UserEmail")
objMail.Subject = "ECP Number: " & pEcpNumber & " -- " & pEcpTitle
objMail.To = "someemails.mil"
'objMail.To = "someemails.net"
objMail.Cc = "someemails.com"
objMail.Bcc = "someemails.com"
objMail.TextBody = emailMessage
' objMail.Send
Response.Redirect("viewAll1.asp")
else
response.write "Failed due to the following error: " & o.Error
end if
end if
set o = nothing
[...code...]
******************************
[...code...] PostModify1.asp [...code...]
if mEcpSubmitEmail = "" then
mEcpSubmitEmail = False
end if
if mEcpCostSubmitEmail = "" then
mEcpCostSubmitEmail = False
end if
if (mEcpMV22PilotSubmit = "True") and (mEcpMV22AircrewSubmit = "True") and (mEcpMV22MaintenanceSubmit = "True") and (mEcpCV22AircrewSubmit = "True") and (mEcpCV22MaintenanceSubmit = "True") and (mEcpSubmitEmail = "False") then
allComments = "Comments for all tracks posted. The ECP Form is ready for costing." & Chr(13)
emailMessage = "Do not reply. This is an automatic email." & Chr(13)
emailMessage = emailMessage & "ECP ID: " & mECPID & Chr(13)
emailMessage = emailMessage & "ECP Number: " & mEcpNumber & Chr(13)
emailMessage = emailMessage & "ECP Title: " & mEcpTitle & Chr(13) & Chr(13)
emailMessage = emailMessage & allComments & Chr(13)
emailMessage = emailMessage & "Check details on https.com"
Set objMail = Server.CreateObject("CDO.Message")
objMail.From = Session("UserEmail")
objMail.Subject = "ECP Number: " & mEcpNumber & " All comments have been posted"
objMail.To = "
[email protected]"
objMail.Cc = "
[email protected]"
objMail.Bcc = "
[email protected]"
objMail.TextBody = emailMessage
objMail.Send
mEcpSubmitEmail = True
end if
%>
[...end code...]
If I can just get this lasttttt little gliche to work that's it for this particular program! Thanks a bunch! :)
Toni Burgess
[email protected]