Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sendmail via SMTP

257 views
Skip to first unread message

Gilles ARNAL

unread,
Mar 22, 1999, 3:00:00 AM3/22/99
to
How can I send a mail by using SMTP from PowerBuilder ?

Roy Kiesler

unread,
Mar 22, 1999, 3:00:00 AM3/22/99
to
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...

Gilles ARNAL

unread,
Mar 22, 1999, 3:00:00 AM3/22/99
to
Roy Kiesler a écrit dans le 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.


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 ???

Roy Kiesler

unread,
Mar 22, 1999, 3:00:00 AM3/22/99
to
> 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
>

What do you need all this stuff for? Just connect to the JMail object.

Roy

Rafael Lenartowicz

unread,
Mar 22, 1999, 3:00:00 AM3/22/99
to
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.
>

Roy Kiesler

unread,
Mar 22, 1999, 3:00:00 AM3/22/99
to
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...

Gilles

unread,
Mar 22, 1999, 3:00:00 AM3/22/99
to
Roy Kiesler a écrit dans le message ...
>What do you need all this stuff for? Just connect to the JMail object.
>
>Roy

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.


Gilles

unread,
Mar 23, 1999, 3:00:00 AM3/23/99
to

Roy Kiesler a écrit dans le message ...
>What do you need all this stuff for? Just connect to the JMail object.
>
>Roy


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.

Communication Forms Pty.Ltd.

unread,
Mar 23, 1999, 3:00:00 AM3/23/99
to
Hi Gilles,

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.

muthu...@my-dejanews.com

unread,
Mar 23, 1999, 3:00:00 AM3/23/99
to
I am trying to send mail via Powrbuilder using PB's MAPI object. But
everytime I excute the "send" it pops up with dialogue box to choose profile.
I have a profile wit the name 'current user'. I do not know how to suppress
the dialogue box. Do I have to have profile with name 'Internet mail'? I
would appreciate if you can give any hints.

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

Rafael Lenartowicz

unread,
Mar 24, 1999, 3:00:00 AM3/24/99
to
The "internet mail" service does not exist in exchange install... I never
had a chance to use it on machine with OExpress only, all our PC's are
configured from image which has exch client on default installed..
As for the code sample - I ripped off the mail demo windows from the PB
Examples application - small modifications needed and it works fine. The
whole "secret" is to have a working profile with user/password which is used
as parameters for MailSession operations...
rgrds
rafael

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

unread,
May 5, 1999, 3:00:00 AM5/5/99
to Gilles ARNAL

Hi,
you can use our free SMTP-DLL on my webpage!

Frank M. Hoyer, FESTO AG&Co.
mailto:h...@festo.de
http://www.Frank-M.Hoyer.com

-----------------------

0 new messages