Mateen
asked on
To send email from within powerbuilder version 7
I am trying to do it first time.
I want to send email from pb7 to Outlook Express
I am trying this via a command button.
mailSession mSes
mailReturnCode mRet
mailMessage mMsg
// Create a mail session
mSes = create mailSession
// Log on to the session
mRet = mSes.mailLogon(mailNewSess ion!)
IF mRet <> mailReturnSuccess! THEN
MessageBox("Mail", 'Logon failed.')
RETURN
END IF
// Populate the mailMessage structure
mMsg.Subject = 'From Within Powerbuilder'
mMsg.NoteText = 'Luncheon at 12:15'
mMsg.Recipient[1].name = 'mrashid'
mMsg.Recipient[1].address = "mrashid@siddiqsons.com"
// Send the mail
mRet = mSes.mailSend(mMsg)
IF mRet <> mailReturnSuccess! THEN
MessageBox("Mail Send", 'Mail not sent')
RETURN
END IF
mSes.mailLogoff()
DESTROY mSes
First a Choose Profile pop up box comes. There in the profile name "Outlook" is written. I dont want this pop up box intermediate.
After pressing ok a new pop up box comes and it says
" a program is trying to automatically send email on your behalf. Do you want to allow this. If this is unexpected , it may be a virus and you should choose no"
I choose yes.
I do not want those two pop boxes to come and ask user response.
There is no error message and yet the email has not been delivered.
Please help.
I want to send email from pb7 to Outlook Express
I am trying this via a command button.
mailSession mSes
mailReturnCode mRet
mailMessage mMsg
// Create a mail session
mSes = create mailSession
// Log on to the session
mRet = mSes.mailLogon(mailNewSess
IF mRet <> mailReturnSuccess! THEN
MessageBox("Mail", 'Logon failed.')
RETURN
END IF
// Populate the mailMessage structure
mMsg.Subject = 'From Within Powerbuilder'
mMsg.NoteText = 'Luncheon at 12:15'
mMsg.Recipient[1].name = 'mrashid'
mMsg.Recipient[1].address = "mrashid@siddiqsons.com"
// Send the mail
mRet = mSes.mailSend(mMsg)
IF mRet <> mailReturnSuccess! THEN
MessageBox("Mail Send", 'Mail not sent')
RETURN
END IF
mSes.mailLogoff()
DESTROY mSes
First a Choose Profile pop up box comes. There in the profile name "Outlook" is written. I dont want this pop up box intermediate.
After pressing ok a new pop up box comes and it says
" a program is trying to automatically send email on your behalf. Do you want to allow this. If this is unexpected , it may be a virus and you should choose no"
I choose yes.
I do not want those two pop boxes to come and ask user response.
There is no error message and yet the email has not been delivered.
Please help.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Hi,
The mail is being sent now. The only problem is that it asks
" A program is attempting to send email on your behalf"
I want to suppress this intermediate question. What is the exact configuration place to stop that.
The mail is being sent now. The only problem is that it asks
" A program is attempting to send email on your behalf"
I want to suppress this intermediate question. What is the exact configuration place to stop that.
ASKER
Ok,
I should explore outlook redemption.
I should explore outlook redemption.
Sandeep