Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Past email error with Microsoft Outlook 2000

Status
Not open for further replies.

mnw

Technical User
Jun 3, 2002
2
US
I am revisiting a problem with being able to email reports with Microsoft Outlook 2000. I have never been able to get past the virus protection popup that occurs when you send email via a macro in cognos. The only way i was able to get past this, was to use an older version of Outlook. Has anyone out there been able to get past this using Outlook 2000???
 
yes; use SMTP instead of a call to Outlook.

soi la, soi carré
 
I am not quite sure how to accomplish this. I have attached the code that i use now when using outlook.


Recipient = "MS Exchange Settings"
Set objOutlook = CreateObject("OutLook.Application")

If i replace "MS Exchange Settings" with "SMTP", nothing changes, still get the virus message.

If i change "CreateObject("OutLook.Application")" with CreateObject("SMTP.Application"), i get a "object creation failed, bad object class" error.
 
On the basis that your Exchange server is set up to allow SMTP mail (often an exploit channel, so may be 'off' as default) and your Cognos PC has SMTP configured, the following code should assist:
Code:
   Dim objMail as Object
   Set objmail = CreateObject("CDONTS.NewMail")
   with objmail
      .From = "Cognos@Acme.com" 
      .To = "DrEvil@Acme.com"
      .CC = "MiniMe@Acme.com"
      .Subject = "World Domination"
      .Body = "New Plan attached"
      .MailFormat = 0 
      .AttachFile "C:\Reports\Plan B.pdf"
      .Send
   End with
   set objmail = nothing

soi la, soi carré
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top