Hi there,
I've got a script to send an email out to whoever, and it works fine if I just run the script. However, I want to run the script from a button inside an html page. When I click on the "send email button", I get a "permission denied" error for the objEmailConfig.Fields property. Here's my script:
I think it might have something to do with the security settings of internet explorer, but that's not something I can change. The idea behind this is that this script will be run on different machines on my company's intranet, so there are company-wide security restrictions on IE. Is this the problem? Or am I missing something? Any way around this?
Thanks,
FK
I've got a script to send an email out to whoever, and it works fine if I just run the script. However, I want to run the script from a button inside an html page. When I click on the "send email button", I get a "permission denied" error for the objEmailConfig.Fields property. Here's my script:
Code:
Function fGenerateEmail()
Dim objEmailConfig
Dim objEmail
Dim sBody
Dim sTitle
Dim sFrom
Dim sTo
Set objEmailConfig = CreateObject("CDO.Configuration")
' "Permission denied" error on the next line.
objEmailConfig.Fields.Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = 2
objEmailConfig.Fields.Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")[/URL] = "smtp_server"
objEmailConfig.Fields.Update
Set objEmail = CreateObject("CDO.Message")
objEmail.Configuration = objEmailConfig
objEmail.From = "me@mydomain.com"
objEmail.To = "my@buddy.com"
objEmail.Subject = "subject"
objEmail.TextBody = "body"
objEmail.Send
End Function
I think it might have something to do with the security settings of internet explorer, but that's not something I can change. The idea behind this is that this script will be run on different machines on my company's intranet, so there are company-wide security restrictions on IE. Is this the problem? Or am I missing something? Any way around this?
Thanks,
FK