Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,080 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,785 people online right now. Registration is fast and FREE... Join Now!




send outlook mail without asking user permission

 
Reply to this topicStart new topic

send outlook mail without asking user permission

keithmoloney
22 Apr, 2008 - 05:19 AM
Post #1

New D.I.C Head
*

Joined: 4 Apr, 2008
Posts: 33



Thanked: 1 times
My Contributions
CODE

Dim oApp As Outlook._Application
        oApp = New Outlook.Application()

        Dim strDest As String = "C:\Documents and Settings\kmoloney\Desktop\kmoloney"
        


        ' Create a new MailItem.
        Dim oMsg As Outlook._MailItem
        oMsg = oApp.CreateItem(Outlook.OlItemType.olMailItem)
        oMsg.Subject = "Success" 'title
        'message body
        oMsg.Body = frmTEST1.Label1.Text + Environment.NewLine + _
        "Files have been copied to " + frmTEST1.txtDest.Text + Environment.NewLine + _
        "" + Environment.NewLine + "The files that were copied are: " + Environment.NewLine + _
        frmTEST1.txtList.Text




        'manager and librarian email will be entered here
        oMsg.To = "blah@blah.com"

        '      Dim sBodyLen As String = oMsg.Body.Length

        ' Send
        oMsg.Send()

        ' Clean up
        oApp = Nothing
        oMsg = Nothing


    End Sub


when this code runs it will send the desired email but only after the user hits an "allow" button.
i want to run this automatically, there will be no user to ok it. is there a way to turn off the permission box?
User is offlineProfile CardPM
+Quote Post

jg007
RE: Send Outlook Mail Without Asking User Permission
22 Apr, 2008 - 10:22 AM
Post #2

New D.I.C Head
*

Joined: 23 Mar, 2008
Posts: 26



Thanked: 1 times
My Contributions
unfortunately this is a new security feature that MS released following several email virus attacks and I have not found any way to disable it.

I have seen various programs to get around this but at $39 they are a bit expensive smile.gif

to get around this you could use SMTPsend although you would have to get the user to enter their SMTP details to use this.

see this page for some code -

http://www.progtalk.com/ViewArticlePrinter...px?ArticleID=52
User is offlineProfile CardPM
+Quote Post

jg007
RE: Send Outlook Mail Without Asking User Permission
22 Apr, 2008 - 10:32 AM
Post #3

New D.I.C Head
*

Joined: 23 Mar, 2008
Posts: 26



Thanked: 1 times
My Contributions
I have also just found another program that might work around this and is a free download although you are need to pay $199 if you actually include it in a program smile.gif

http://www.dimastr.com/redemption/


User is offlineProfile CardPM
+Quote Post

Jayman
RE: Send Outlook Mail Without Asking User Permission
22 Apr, 2008 - 01:32 PM
Post #4

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,319



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
Use the System.Net.Mail Namespace.
User is offlineProfile CardPM
+Quote Post

BloodyPeasant
RE: Send Outlook Mail Without Asking User Permission
4 Aug, 2008 - 07:42 AM
Post #5

New D.I.C Head
*

Joined: 19 Jun, 2008
Posts: 2

I've had good luck using this free add-in to avoid the MSFT security alerts

ASPEmail

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 11:29PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month