Remove Annoying "Logon Prompt" Using Outlook (1 Viewer)

RonAndAccess

New member
Local time
Yesterday, 22:09
Joined
Dec 31, 2012
Messages
2
The following code works great with Outlook 2007, sending to a Yahoo Mail account without the pesky "Logon Prompt"


Dim OutApp As Object
Dim OutMail As Object
Dim strBody As String

On Error GoTo Err_SendEmail_Click

Set OutApp = CreateObject("Outlook.Application")

OutApp.Session.Logon
strBody = " text "
Set OutMail = OutApp.CreateItem(0)
OutMail.To = "xxxxx@xxxxxx"
' OutMail.BCC = "xxx@xxxxx"
OutMail.Subject = " subject "
OutMail.Body = strBody
OutMail.Send 'Send | Display
---------------------------------------------------------------------------:)
One solution to getting rid of the "Logon Prompt" in Outlook 2007

Select Tools > Options > Mail Setup >

Select "Send/Receive" button


Uncheck "Schedule an Automatic Send/Receive" every 30 minutes
 

pr2-eugin

Super Moderator
Local time
Today, 05:09
Joined
Nov 30, 2011
Messages
8,494
Hello RonAndAccess, Welcome to AWF.. :)

The above code will work just as you have dictated it to.. You have the code..
Code:
OutApp.Session.Logon
That will thus prompt for login information. Try commenting it out and see what happens.. Also you need to have a proper error handler, as the CreateObject is likely to throw an error.. Lets take one step at a time.. Post back if you have troubles..
 

Users who are viewing this thread

Top Bottom