Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Security when sending mail using VB

Status
Not open for further replies.

jimbob2002

Programmer
May 21, 2002
2
0
0
GB
Hi,

I have set up an automated email linked to my access database and everything works fine until the email is sent. Then I am presented with a pop up security box which stops my automated process. I have checked the forums and cannot see a way of bypassing this protection without using other utilities/software, can anybody help me?

Cheers,

Jimbob
 
One method to try might be adding a VBA reference to an MS CDO library and then using CDONTS to send the e-mail rather than Outlook, with code somehting like:
Code:
Dim oEMail As New CDONTS.EMail

oEMail.From "anyname@anydomain.com"
oEMail.To "youremail@yourdomain.com"
oEMail.BodyFormat = CdoBodyFormatText
oEMail.Body = "Insert some useful text here"
oEMail.Importance = CdoHigh
oEMail.AttachFile "C:\filename.txt"
oEMail.Send

Another is to use Outlook Redemption, available from - yes, it's a third party external utility but it does exactly what you want whilst still allowing the mail to be send from/by Outlook.

Hope this helps.

[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top