Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

MailLogon fail

5 posts in Objects Last posting was on 2007-08-08 03:36:49.0Z
Neil Garcia Posted on 2007-08-07 01:31:27.0Z
Sender: 3b21.46b7c9a8.1804289383@sybase.com
From: Neil Garcia
Newsgroups: sybase.public.powerbuilder.objects
Subject: MailLogon fail
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46b7cb6f.3b50.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 6 Aug 2007 18:31:27 -0700
X-Trace: forums-1-dub 1186450287 10.22.241.41 (6 Aug 2007 18:31:27 -0700)
X-Original-Trace: 6 Aug 2007 18:31:27 -0700, 10.22.241.41
Lines: 25
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9405
Article PK: 736562

Hi,

I have this other problem with MAPI with the code below:

mailSession mSes
mailReturnCode mRet
mailMessage mMsg

// Create a mail session

mSes = create mailSession
// Log on to the session
mRet = mSes.mailLogon(mailNewSession!)

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

the code below always displays Logon failed. no matter what
I do.

Again, this is in PB10 evaluation version. Any ideas would
be much appreciated. thanks.
Neil


Adam Simmonds [TeamSybase] Posted on 2007-08-07 02:11:44.0Z
From: "Adam Simmonds [TeamSybase]" <adam.simmonds@remove.exemail.com.au>
User-Agent: Thunderbird 1.5.0.8 (Windows/20061025)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: MailLogon fail
References: <46b7cb6f.3b50.1681692777@sybase.com>
In-Reply-To: <46b7cb6f.3b50.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: nat-1248.mp.usyd.edu.au
X-Original-NNTP-Posting-Host: nat-1248.mp.usyd.edu.au
Message-ID: <46b7d4e0$1@forums-1-dub>
Date: 6 Aug 2007 19:11:44 -0700
X-Trace: forums-1-dub 1186452704 129.78.56.224 (6 Aug 2007 19:11:44 -0700)
X-Original-Trace: 6 Aug 2007 19:11:44 -0700, nat-1248.mp.usyd.edu.au
Lines: 35
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9407
Article PK: 736563

This is not an answer to your question but you should probably look at
using this redemption dll to interact with outlook. You will have
problems with security if you continue down the path you are heading.

http://www.dimastr.com/redemption/

a.

Neil Garcia wrote:
> Hi,
>
> I have this other problem with MAPI with the code below:
>
> mailSession mSes
> mailReturnCode mRet
> mailMessage mMsg
>
> // Create a mail session
>
> mSes = create mailSession
> // Log on to the session
> mRet = mSes.mailLogon(mailNewSession!)
>
> IF mRet <> mailReturnSuccess! THEN
> MessageBox("Mail", 'Logon failed.')
> RETURN
> END IF
>
> the code below always displays Logon failed. no matter what
> I do.
>
> Again, this is in PB10 evaluation version. Any ideas would
> be much appreciated. thanks.
> Neil


Neil Garcia Posted on 2007-08-07 05:34:56.0Z
Sender: 3ee2.46b7f82c.1804289383@sybase.com
From: Neil Garcia
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: MailLogon fail
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46b80480.4046.1681692777@sybase.com>
References: <46b7d4e0$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 6 Aug 2007 22:34:56 -0700
X-Trace: forums-1-dub 1186464896 10.22.241.41 (6 Aug 2007 22:34:56 -0700)
X-Original-Trace: 6 Aug 2007 22:34:56 -0700, 10.22.241.41
Lines: 46
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9412
Article PK: 736570

I am exploring redemption dll now ( I have installed it as
instructed) but I really could not start. Don't know where
to start. There are sample scripts on VB but I could not
convert it to PB. Can you guide me thru just to start it?

If you have some code snippet, please share it with me.
Thanks.

Neil

> This is not an answer to your question but you should
> probably look at using this redemption dll to interact
> with outlook. You will have problems with security if you
> continue down the path you are heading.
>
> http://www.dimastr.com/redemption/
>
> a.
>
>
> Neil Garcia wrote:
> > Hi,
> >
> > I have this other problem with MAPI with the code below:
> >
> > mailSession mSes
> > mailReturnCode mRet
> > mailMessage mMsg
> >
> > // Create a mail session
> >
> > mSes = create mailSession
> > // Log on to the session
> > mRet = mSes.mailLogon(mailNewSession!)
> >
> > IF mRet <> mailReturnSuccess! THEN
> > MessageBox("Mail", 'Logon failed.')
> > RETURN
> > END IF
> >
> > the code below always displays Logon failed. no matter
> > what I do.
> >
> > Again, this is in PB10 evaluation version. Any ideas
> > would be much appreciated. thanks.
> > Neil


Adam Simmonds [TeamSybase] Posted on 2007-08-07 06:25:13.0Z
From: "Adam Simmonds [TeamSybase]" <adam.simmonds@remove.exemail.com.au>
User-Agent: Thunderbird 1.5.0.8 (Windows/20061025)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: MailLogon fail
References: <46b7d4e0$1@forums-1-dub> <46b80480.4046.1681692777@sybase.com>
In-Reply-To: <46b80480.4046.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: nat-1248.mp.usyd.edu.au
X-Original-NNTP-Posting-Host: nat-1248.mp.usyd.edu.au
Message-ID: <46b81049$1@forums-1-dub>
Date: 6 Aug 2007 23:25:13 -0700
X-Trace: forums-1-dub 1186467913 129.78.56.224 (6 Aug 2007 23:25:13 -0700)
X-Original-Trace: 6 Aug 2007 23:25:13 -0700, nat-1248.mp.usyd.edu.au
Lines: 99
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9413
Article PK: 736571

I cant find some old code where I used it but a google search yielded a
decent example.

http://www.experts-exchange.com/Programming/Programming_Languages/PowerBuilder/Q_21618118.html

------------------------------------------------------------------------
oleOutlook = create oleobject
rc = oleOutlook.ConnectToNewObject("outlook.application")

If rc = 0 Then
oleNameSpace = oleOutlook.GetNameSpace("MAPI")
oleNameSpace.Logon("", "", true, true)

oleSafeMailItem = create oleobject
rc =
oleSafeMailItem.ConnectToNewObject("Redemption.SafeMailItem")

If rc = 0 Then
oleTmp = create oleobject
oleTmp = oleOutlook.CreateItem(0)
oleSafeMailItem.Item = oleTmp
oleSafeMailItem.Recipients.Add(ls_sendto)
oleSafeMailItem.Recipients.ResolveAll
oleSafeMailItem.Subject = ls_subject
oleSafeMailItem.Send

Else
MessageBox("Mail Error", &
"Your email could not be sent. Please contact
IT.~r~n" + &
"The SafeMailItem - ConnectToNewObject~r~n" + &
"failed with a return code of " + String(rc) +
".", &
StopSign!, &
Ok!)
End If
Else
MessageBox("Mail Error", &
"Your email could not be sent. Please contact
IT.~r~n" + &
"The Outlook Application - ConnectToNewObject~r~n" + &
"failed with a return code of " + String(rc) + ".", &
StopSign!, &
Ok!)
End If
------------------------------------------------------------------------


a.

Neil Garcia wrote:
> I am exploring redemption dll now ( I have installed it as
> instructed) but I really could not start. Don't know where
> to start. There are sample scripts on VB but I could not
> convert it to PB. Can you guide me thru just to start it?
>
> If you have some code snippet, please share it with me.
> Thanks.
>
> Neil
>
>> This is not an answer to your question but you should
>> probably look at using this redemption dll to interact
>> with outlook. You will have problems with security if you
>> continue down the path you are heading.
>>
>> http://www.dimastr.com/redemption/
>>
>> a.
>>
>>
>> Neil Garcia wrote:
>>> Hi,
>>>
>>> I have this other problem with MAPI with the code below:
>>>
>>> mailSession mSes
>>> mailReturnCode mRet
>>> mailMessage mMsg
>>>
>>> // Create a mail session
>>>
>>> mSes = create mailSession
>>> // Log on to the session
>>> mRet = mSes.mailLogon(mailNewSession!)
>>>
>>> IF mRet <> mailReturnSuccess! THEN
>>> MessageBox("Mail", 'Logon failed.')
>>> RETURN
>>> END IF
>>>
>>> the code below always displays Logon failed. no matter
>>> what I do.
>>>
>>> Again, this is in PB10 evaluation version. Any ideas
>>> would be much appreciated. thanks.
>>> Neil


Neil Garcia Posted on 2007-08-08 03:36:49.0Z
Sender: 3ee2.46b7f82c.1804289383@sybase.com
From: Neil Garcia
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: MailLogon fail
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46b93a51.5d59.1681692777@sybase.com>
References: <46b81049$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Aug 2007 20:36:49 -0700
X-Trace: forums-1-dub 1186544209 10.22.241.41 (7 Aug 2007 20:36:49 -0700)
X-Original-Trace: 7 Aug 2007 20:36:49 -0700, 10.22.241.41
Lines: 109
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9414
Article PK: 736572

Great. Thank you very much for the help.

> I cant find some old code where I used it but a google
> search yielded a decent example.
>
>
http://www.experts-exchange.com/Programming/Programming_Languages/PowerBuilder/Q_21618118.html
>
> ----------------------------------------------------------
> --------------
> oleOutlook = create oleobject
> rc =
> oleOutlook.ConnectToNewObject("outlook.application")
>
> If rc = 0 Then
> oleNameSpace = oleOutlook.GetNameSpace("MAPI")
> oleNameSpace.Logon("", "", true, true)
>
> oleSafeMailItem = create oleobject
> rc =
> oleSafeMailItem.ConnectToNewObject("Redemption.SafeMailIte
> m")
>
> If rc = 0 Then
> oleTmp = create oleobject
> oleTmp = oleOutlook.CreateItem(0)
> oleSafeMailItem.Item = oleTmp
> oleSafeMailItem.Recipients.Add(ls_sendto)
> oleSafeMailItem.Recipients.ResolveAll
> oleSafeMailItem.Subject = ls_subject
> oleSafeMailItem.Send
>
> Else
> MessageBox("Mail Error", &
> "Your email could not be sent.
> Please contact IT.~r~n" + &
> "The SafeMailItem -
> ConnectToNewObject~r~n" + &
> "failed with a return code of " +
> String(rc) + ".", &
> StopSign!, &
> Ok!)
> End If
> Else
> MessageBox("Mail Error", &
> "Your email could not be sent. Please
> contact IT.~r~n" + &
> "The Outlook Application -
> ConnectToNewObject~r~n" + &
> "failed with a return code of " +
> String(rc) + ".", &
> StopSign!, &
> Ok!)
> End If
> ----------------------------------------------------------
> --------------
>
>
> a.
>
>
>
> Neil Garcia wrote:
> > I am exploring redemption dll now ( I have installed it
> > as instructed) but I really could not start. Don't know
> > where to start. There are sample scripts on VB but I
> > could not convert it to PB. Can you guide me thru just
> > to start it?
> > If you have some code snippet, please share it with me.
> > Thanks.
> >
> > Neil
> >
> >> This is not an answer to your question but you should
> >> probably look at using this redemption dll to interact
> >> with outlook. You will have problems with security if
> you >> continue down the path you are heading.
> >>
> >> http://www.dimastr.com/redemption/
> >>
> >> a.
> >>
> >>
> >> Neil Garcia wrote:
> >>> Hi,
> >>>
> >>> I have this other problem with MAPI with the code
> below: >>>
> >>> mailSession mSes
> >>> mailReturnCode mRet
> >>> mailMessage mMsg
> >>>
> >>> // Create a mail session
> >>>
> >>> mSes = create mailSession
> >>> // Log on to the session
> >>> mRet = mSes.mailLogon(mailNewSession!)
> >>>
> >>> IF mRet <> mailReturnSuccess! THEN
> >>> MessageBox("Mail", 'Logon failed.')
> >>> RETURN
> >>> END IF
> >>>
> >>> the code below always displays Logon failed. no matter
> >>> what I do.
> >>>
> >>> Again, this is in PB10 evaluation version. Any ideas
> >>> would be much appreciated. thanks.
> >>> Neil