Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Email
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01057793
Message ID:
01057793
Views:
43
Ok, here is my code to send email. However, when this code is executed, I get a pop MS Outlook window asking me to select yes. The message in the window is Program is trying to send e-mail automatically.

How can I stop this window from coming up?


#DEFINE MAILITEM 0
#DEFINE IMPORTANCENORMAL 1

oOutLookObject = CreateObject("Outlook.Application")
oEmailItem = oOutLookObject.CreateItem(MAILITEM)
olByReference = 4

WITH oEmailItem
.Body = "Put Your Message Here"
.to = "Zachary.Ahmed@conferon.com"
.Subject = "Put Subject here"
.ReadReceiptRequested = .F.
.Importance = IMPORTANCENORMAL

with .Attachments.add("E:\Temp\Test\Completed\Sw_Upload_result-10-10-05.xls", olByReference)
.DisplayName = "Sherwin William Upload"
endwith
.Send
ENDWITH

RELEASE oEmailItem
RELEASE oOutLookObject


thanks
Next
Reply
Map
View

Click here to load this message in the networking platform