02-17-2004, 12:59 PM
I have just come into a problem with an internal app that we created with vb.net. When generating an automated email MS Outlook displays a window saying:
"A program is trying to automatically send e-mail on your behalf.
Do you want to allow this?
If this is unexpected, it may be a virus and you should choose "No"."
Selecting "Yes" allows the email to be sent.
How would I get rid of this through Outlook or through vb.net code???
02-17-2004, 02:20 PM
This is due to the SR1 security patch. It is not something that can be turned off. (except by the outlook exchange admin, if I remember correctly). Your looking at having to use Outlook Redemption or Express ClickYes. Or writing your own program which either uses extended MAPI or sends messages to the to the correct buttons on the offending outlook message boxes.
03-17-2004, 06:15 AM
I had the same issue. This was due to the fact that I was getting the application to 'ask' outlook to send an email.
this was using <mailto:>
Changing the app to directly send an email to the email server worked...
add a reference to system.web to your project then
Dim email As New System.Web.Mail.MailMessage
Dim from As String
Dim subject As String
Dim body As String
Dim message, title, defaultValue As String
Dim myValue As Object
Dim emailto As String
emailto = "<email address from where>"
body = "The details"
subject = "The Subject"
from = "<Who it from>"
email.To = emailto
email.From = from
email.Body = body
email.Subject = subject
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "<the name of the email server here>"
This sends an email directly through your email server & prevents any outlook security conflicts.
Hope this helps!