Email sending VBscript doesn't work


P

Philip_Hui

I wrote a piece code for sending a email to somebody no matter who pos
a message in the company around one year ago. It worked well, but i
was no longer work since SP got updated. Every time people post messag
a warning would show said "A program is trying to access e-mai
addresses you have stored in Outlook. Do you want to allow this?"
after you click YES the message would disapper, but email couldn't b
sent out.

For fix this problem, I used Redemption Object in my code, message wa
no longer pop up, but email still couldn't be sent out, the test cod
is as follow:

Function Request_Click()

dim SafeItem, oItem
set SafeItem = CreateObject("Redemption.SafeMailItem")
set oItem = Application.CreateItem(0)
SafeItem.Item = oItem
SafeItem.Recipients.Add "Philip Hui"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = "Testing"
SafeItem.Send

End Function

Anyone has experience on this? thanks

Phili
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top