Hi Guru
i try to send mail from Powerbuilder.
Where is the problem in my simple code ?
mailSession mSes
mailReturnCode mRet
mailMessage mMsg
mSes = create mailSession // Create a mail session
mRet = mSes.mailLogon(mailNewSession!) // Log on to the session
IF mRet <> mailReturnSuccess! THEN
MessageBox("Mail", 'Logon failed.')
RETURN
END IF
// Populate the mailMessage structure
mMsg.Subject = "HI"
mMsg.NoteText = 'from Italy'
mMsg.Recipient[1].name = 'xxxxxx.yyyyyyy@gmail.com'
mRet = mSes.mailSend(mMsg) // Send the mail
IF mRet <> mailReturnSuccess! THEN
MessageBox("Mail Send", 'Mail not sent')
RETURN
END IF
mSes.mailLogoff()
DESTROY mSes