Solved

How to prevent Outlook from prompting user to allow Powerbuilder to send an email

Posted on 2004-08-27
3
840 Views
Last Modified: 2013-12-26
Hi all,

Is there a way to code Powerbuilder to prevent Outlook from popping up that annoying prompt that makes you wait 5 seconds before you can send the email?  I opened a question on how to talk directly to exchange server but I did not get a reply so I am thinking that cannot be done.

Thanks for your help!  Paul

Here is my code:

mailSession mSes

mailReturnCode mRet
mailMessage mMsg
mailFileDescription mAttach

mMsg.Recipient[1].name = 'paulericmurray@hotmail.com'
mMsg.Recipient[1].RecipientType = mailTo!
mMsg.Recipient[2].name = 'pemurray@groundtravel.com'
mMsg.Recipient[2].RecipientType      = mailCC!

mAttach.Filename = 'Apollo.doc'
mAttach.Pathname = 'T:\Apollo.doc'
mAttach.FileType = mailAttach!
//mAttach.Position = 1

mMsg.Subject = 'Test Message'
mMsg.NoteText = 'This is the body of mail ~nAuto Generated E-mail by the system'


// Create a mail session
mSes = CREATE mailSession
// Log on to the session
//mRet = mSes.mailLogon(mailNewSession!)

mRet = mSes.mailLogon()
IF mRet <> mailReturnSuccess! THEN
     MessageBox("Mail", 'Logon failed.')
     RETURN
END IF

mMsg.AttachmentFile[1] = mAttach
IF mRet <> mailReturnSuccess! THEN
     MessageBox("Mail", 'Attachment failed.')
     RETURN
END IF


mRet = mSes.mailAddress(mMsg)
IF mRet <> mailReturnSuccess! THEN
     MessageBox("Mail", 'Addressing failed.')
     RETURN
END IF

// Send the mail
mRet = mSes.mailSend(mMsg)
IF mRet <> mailReturnSuccess! THEN
     MessageBox("Mail", 'Sending mail failed.')
        MessageBox("Mail", String(mRet))

string mailreturnstring
        
        mailreturnstring = MailErrorToString(mRet)
        MessageBox("Email Result", "Email ReturnCode = " + mailreturnstring)
     RETURN
END IF

mSes.mailLogoff()
DESTROY mSes

0
Comment
Question by:pemurray
3 Comments
 
LVL 33

Accepted Solution

by:
sajuks earned 250 total points
ID: 11919282
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now