Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tripping over Outlook's Security w multiple e-mails
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Tripping over Outlook's Security w multiple e-mails
Divers
Thread ID:
00949943
Message ID:
00949943
Vues:
53
I've been tasked with sending out e-mails to our customers. I'm pulling the e-mail addresses, invoking an OLE object to send the e-mail, and am getting the following warning message:

"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".

Now, if this only fired once, I wouldn't mind, it would be a mere annoyance. Unfortunately, it fires for every single e-mail. Any ideas on resolving this?

The emailer is written in VFP7. We are using Outlook, with Microsoft Exchange Server (Sp 3). Here is the code invoking the email.
oOutLookObject = CreateObject("Outlook.Application") 
oNamespace = oOutlookObject.GetNamespace("MAPI")
oFolder = oNamespace.GetDefaultfolder(6)

IF glTested
** Need to Build Email Address File first....
	USE c:\temp\EmailSource
	
	lnCont = MESSAGEBOX('You will be sending ' + TRANSFORM(RECCOUNT()) + ' emails.  Continue?', 20)
	IF lnCont = 6
		SCAN
			oEmailItem = oOutLookObject.CreateItem(MAILITEM)
			gcWhoTo = ALLTRIM(EmailAddr)
			IF llAttach
				WITH oEmailItem 
					.To = gcWhoTo
					.Subject = lcHeader
					.Importance = IMPORTANCENORMAL 
					.Body = lcBody
					.Attachments.Add(lcAttachment) 
					.Send 
				ENDWITH 
			  ELSE
				WITH oEmailItem 
					.To = gcWhoTo
					.Subject = lcHeader
					.Importance = IMPORTANCENORMAL 
					.Body = lcBody
					.Send
				ENDWITH
			ENDIF
		ENDSCAN
		THISFORM.Commandgroup1.command2.Enabled = .F.
	ENDIF
"It came to pass"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform