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.

How to use MAPI

4 posts in Objects Last posting was on 2002-08-23 15:34:05.0Z
Jane Chen Posted on 2002-08-21 06:40:16.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Jane Chen" <yajuan_chen2000@yahoo.com>
Subject: How to use MAPI
Date: Tue, 20 Aug 2002 23:40:16 -0700
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
NNTP-Posting-Host: CPE014280107241.cpe.net.cable.rogers.com 24.157.121.89
Message-ID: <364_khCzzYMSCHA.288@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1010
Article PK: 713575

Hi,
When I use MAPI to send an email, I use the following steps.

mSes = create mailSession
mRet = mSes.mailLogon(mailNewSession!)
mMsg.Subject = 'try'
mMsg.notetext = 'text'
mMsg.Recipient[1].Address = 'yajuan_chen2000@yahoo.com'
mMsg.Recipient[1].Name = 'Jane'
mMsg.Recipient[1].RecipientType = MailTo!
mRet = mSes.mailsend(mMsg)
mRet = mSes.mailLogoff()
destroy mSes

But, they did not work. And when I look for the online help, a concept
"system's address list" is mentioned several times. Could someone pls let me
know how to set this address list?

Thanks in advance,
Jane


Michael Chernin Posted on 2002-08-22 13:28:14.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Michael Chernin" <michaelc@city.kitchener.on.ca>
From: "Michael Chernin" <michaelc@city.kitchener.on.ca>
Subject: Re: How to use MAPI
Date: Thu, 22 Aug 2002 09:28:14 -0400
Lines: 30
Organization: City Of Kitchener, Ontario, Canada
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 155.194.200.20
Message-ID: <364_b6FhUGeSCHA.251@forums.sybase.com>
References: <364_khCzzYMSCHA.288@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1003
Article PK: 713572

What do you mean "Didn't work?"
Try to add mSes.ResolveRecipient() function call before mailSend.

"Jane Chen" <yajuan_chen2000@yahoo.com> wrote in message
news:khCzzYMSCHA.288@forums.sybase.com...
> Hi,
> When I use MAPI to send an email, I use the following steps.
>
> mSes = create mailSession
> mRet = mSes.mailLogon(mailNewSession!)
> mMsg.Subject = 'try'
> mMsg.notetext = 'text'
> mMsg.Recipient[1].Address = 'yajuan_chen2000@yahoo.com'
> mMsg.Recipient[1].Name = 'Jane'
> mMsg.Recipient[1].RecipientType = MailTo!
> mRet = mSes.mailsend(mMsg)
> mRet = mSes.mailLogoff()
> destroy mSes
>
> But, they did not work. And when I look for the online help, a concept
> "system's address list" is mentioned several times. Could someone pls let
me
> know how to set this address list?
>
> Thanks in advance,
> Jane
>
>


Joe_Slawsky Posted on 2002-08-22 18:33:32.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Joe_Slawsky
Date: Thu, 22 Aug 2002 14:33:32 -0400
Subject: Re: How to use MAPI
Lines: 8
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_F0593E7AFC388C8D0065F28F85256C1D.004DC00F85256C1D@webforums>
References: <364_khCzzYMSCHA.288@forums.sybase.com> <364_b6FhUGeSCHA.251@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:999
Article PK: 713560

Also from another post, you might want to use smtp: in front of the address
if it is outside your mail system as in smtp:someone@somewhere.com . Take
a look at the example in the online help for mailaddress. You can narrow
down your problem by checking the return codes and see where it goes wrong.
Try it and let us know where the actual problem is. Good Luck.

- Joe Slawsky (NOSPAMFORME_jslawsky@planetdx.com)
www.planetdx.com


Jane Chen Posted on 2002-08-23 15:34:05.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Jane Chen" <yajuan_chen2000@yahoo.com>
Subject: Re: How to use MAPI
Date: Fri, 23 Aug 2002 08:34:05 -0700
Lines: 56
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
NNTP-Posting-Host: CPE014280107241.cpe.net.cable.rogers.com 24.157.121.89
Message-ID: <364_kp80aMqSCHA.183@forums.sybase.com>
References: <364_khCzzYMSCHA.288@forums.sybase.com> <364_b6FhUGeSCHA.251@forums.sybase.com> <364_F0593E7AFC388C8D0065F28F85256C1D.004DC00F85256C1D@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:994
Article PK: 713559

Thank you very much for your replies.

Sorry for my shortage of the knowledge about mail system. I do not know how
to configure a local mail system. But I do want to send an email outside my
mail system without any interference from user. And I have no idea about why
calling mSes.mailSend(mMsg) will invoke yahoo mail logon system instead of
others like hotmail. (Is there any setting using yahoo as my default mail
system?)

As you suggested, I tested the return code of every call of mail function.
They are as follows:

mSes = create mailSession <success>
mRet = mSes.mailLogon(mailNewSession!) <success>
mMsg.Subject = 'try'
mMsg.notetext = 'text'
mMsg.Recipient[1].Address = 'smtp: yajuan_chen2000@yahoo.com'
------> I am not sure if I use 'smtp:' in front of my email address or use
the IP address of smtp server of Yahoo mail system.

mMsg.Recipient[1].Name = 'Jane'
mMsg.Recipient[1].RecipientType = MailTo!
mSes.mailAddress()
------> failure, with or without parameter mMsg.
And, the online help says there will be an address dialog box opened
without the
parameter. But no address dialog box appears at all in this case.

mSes.mailResolveRecipient ( mMsg.recipient[1], True)
------> failure. And I don't know how to set the Address list.

mRet = mSes.mailsend(mMsg)
------> return success. Will open the yahoo mail logon window. Even I add my
user name and password in the function maillogon, it can not logon
automatically.

mRet = mSes.mailLogoff()
destroy mSes

Thanks,
Jane

<Joe_Slawsky> wrote in message
news:F0593E7AFC388C8D0065F28F85256C1D.004DC00F85256C1D@webforums...
> Also from another post, you might want to use smtp: in front of the
address
> if it is outside your mail system as in smtp:someone@somewhere.com . Take
> a look at the example in the online help for mailaddress. You can narrow
> down your problem by checking the return codes and see where it goes
wrong.
> Try it and let us know where the actual problem is. Good Luck.
>
> - Joe Slawsky (NOSPAMFORME_jslawsky@planetdx.com)
> www.planetdx.com