You have to use a 3rd party OCX or DLL for that. There are a few of them out
there, some even for free -- everyone please feel free to jump in with your
success stories.
A good place to start looking is http://www.componentsource.com.
--
pbm_hopethishelps,
Roy
Gilles ARNAL <gar...@sqli.fr> wrote in message
news:BMs4E2Jd#GA....@forums.sybase.com...
I try to use an active X but it doesn't work : I use "jmail" active X but i
didn't succeed to instantiate the active X from PowerBuilder. The active X
is on my PC.
I use the code following :
**************************** begin of
script*******************************
OLEObject PBObject, PBNVObject
long ll_status
PBObject = CREATE OLEObject
ll_status = PBObject.ConnectToNewObject ("PowerBuilder.Application")
// Handle the error
IF ll_status < 0 THEN
MessageBox("No Server", "Can't connect to PowerBuilder.Application.")
RETURN
END IF
PBObject.LibraryList = "C:\WINDOWS\SYSTEM32\JMAIL\JMAIL.DLL"
PBObject.MachineCode = TRUE
PBNVObject = CREATE OLEObject
PBNVObject = PBObject.CreateObject ("jmail.SMTPMail")
If (ISnull (PBNVObject)) Then
MessageBox ("", "PBNVObject n'a pas été instancié")
return
End if
PBNVObject.ServerAddress = "mail.smtp.toto.fr:25"
PBNVObject.Sender = "gar...@sqli.fr"
PBNVObject.Subject = "Here you go..."
PBNVObject.Body = "Here you go. Your request has been approved and the
program is attached to this message"
PBNVObject.Priority = 1
PBNVObject.Execute
IF IsNull(PBNVObject) THEN
// Handle the error
MessageBox ("IsNull(PBNVObject", "IsNull(PBNVObject")
ELSE
MessageBox ("", "objet instantiate")
END IF
DESTROY PBNVObject
PBObject.DisconnectObject ()
**************************** end of script
*******************************
The line "PBNVObject = PBObject.CreateObject ("jmail.SMTPMail")" return Null
value.
Any suggestions ???
What do you need all this stuff for? Just connect to the JMail object.
Roy
it seems like all mail function don't give care about what's the transport
"behind the scenes" - as long the profile in your mail settings is working
fine...
rgrds
rafael
Roy Kiesler wrote in message ...
>Giles,
>
>You have to use a 3rd party OCX or DLL for that. There are a few of them
out
>there, some even for free -- everyone please feel free to jump in with your
>success stories.
>
>A good place to start looking is http://www.componentsource.com.
>
That's good to know. Did you try it with no Exchange client installed --
just Outlook express?
If it indeed works that way, will you be kind and send a code sample to the
original poster we are trying to help?
hanks,
Roy
Rafael Lenartowicz <bos...@yahoo.com> wrote in message
news:WS2YasKd#GA....@forums.sybase.com...
I have already tryed just to connect to the jmail object. But when i do
this, i have the error message "Error calling external object function
execute" when PB execute the line "PBObject.Execute()".
And i 'm sure this function exists !!!
Gilles.
Finally, I succeed : i had forgotten to define recipient (stupid i am !!!)
with function "addrecipient".
To find the error, i make a user object with oleoject class ; and then i
use a messagebox to see the reason of the error.
Thanks a lot Roy, by telling me to connect to the jmail object, i finally
find my error.
Gilles ARNAL.
You can use PB built-in objects, such as mailMessage, mailSession. They
are well documented in the on-line help files and PB Books. I am using
these objects and functions in the current development, so far it works
with Netscape, Outlook, Outlook Express, MS Exchange.
Good Luck.
Alex.
thanks
Himanshu Parikh
Gymboree Corp.
In article <WS2YasKd#GA....@forums.sybase.com>,
"Rafael Lenartowicz" <bos...@yahoo.com> wrote:
> are you sure 3rd pty is needed ? I have it working with regular MAPI
> functions and following setup :
> - exchange client
> - profile with "Internet Mail" service installed ( part of outlook express )
> - the Internet Mail client has all the POP3/SMTP parameters...
>
> it seems like all mail function don't give care about what's the transport
> "behind the scenes" - as long the profile in your mail settings is working
> fine...
> rgrds
> rafael
>
> Roy Kiesler wrote in message ...
> >Giles,
> >
> >You have to use a 3rd party OCX or DLL for that. There are a few of them
> out
> >there, some even for free -- everyone please feel free to jump in with your
> >success stories.
> >
> >A good place to start looking is http://www.componentsource.com.
> >
> >--
> >pbm_hopethishelps,
> >Roy
> >
> >Gilles ARNAL <gar...@sqli.fr> wrote in message
> >news:BMs4E2Jd#GA....@forums.sybase.com...
> >> How can I send a mail by using SMTP from PowerBuilder ?
> >>
> >>
> >
> >
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Roy Kiesler wrote in message ...
>Rafael,
>
>That's good to know. Did you try it with no Exchange client installed --
>just Outlook express?
>If it indeed works that way, will you be kind and send a code sample to the
>original poster we are trying to help?
>
>hanks,
>Roy
>
>Rafael Lenartowicz <bos...@yahoo.com> wrote in message
>news:WS2YasKd#GA....@forums.sybase.com...
Frank M. Hoyer, FESTO AG&Co.
mailto:h...@festo.de
http://www.Frank-M.Hoyer.com
-----------------------