Sending email from Dolphin ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Sending email from Dolphin ?

Panu Viljamaa-3
Is there a way(s) to send email from within a Dolphin program ?

Thanks
-Panu Viljamaa


Reply | Threaded
Open this post in threaded view
|

Re: Sending email from Dolphin ?

Ken Lee
Panu -
> Is there a way(s) to send email from within a Dolphin program ?

Here is a sample peice of code for you to valuate You can call this from any
method. It launches the default email client on the user's PC.

ShellLibrary default shellOpen: 'mailto:[hidden email]?subject=This is the
subject&body=This is the body'

Best wishes,

Ken Lee


Reply | Threaded
Open this post in threaded view
|

Re: Sending email from Dolphin ?

Panu Viljamaa-3
Ken Lee wrote:

> ...
> ShellLibrary default shellOpen: 'mailto:[hidden email]?subject=This is the
> subject&body=This is the body'

This is nifty. Thanks.  However, I'm really looking into ways of sending the
email automatically, without human interaction. Any pointers ? Do I need to
program SMTP support myself, or is there perhaps a library somewhere ?

Thanks
Panu Viljamaa


Reply | Threaded
Open this post in threaded view
|

Re: Sending email from Dolphin ?

Dmitry Zamotkin-3
Hello Panu,

> This is nifty. Thanks.  However, I'm really looking into ways of sending
the
> email automatically, without human interaction. Any pointers ? Do I need
to
> program SMTP support myself, or is there perhaps a library somewhere ?

I've tried two ways: MSMAPI and SMTP.


For MSMAPI you should wrap "Microsoft MAPI Controls" in Dolphin Smalltalk
and use a sample code below.

session := MSMAPIIMapiSession new signOn.

"with using MSMAPIConstants"
MSMAPIIMapiMessages new
  sessionID: session sessionID;
  msgIndex: mapNewMessage;
  recipAddress: '[hidden email]';
  msgSubject: 'subject here';
  msgNoteText: 'body here';
  action: mapSend


To send mail via SMTP I've found al lot of freeware COM-components. I cant
quote my code, because I choose a package with russian encoding support and
manual.

Sincerely,
Dmitry Zamotkin


Reply | Threaded
Open this post in threaded view
|

Re: Sending email from Dolphin ?

Udo Schneider
In reply to this post by Panu Viljamaa-3
Panu

> This is nifty. Thanks.  However, I'm really looking into ways of sending
the
> email automatically, without human interaction. Any pointers ? Do I need
to
> program SMTP support myself, or is there perhaps a library somewhere ?


Maybe using MAPI to send E-Mails would be an alternative for you. It's easy
to
use but maybe has two undesired sideeffects for you (or the user). You'll
(the user)
need to have a MAPI cappable E-Mail Client installed and you have to play a
little
bit with Dolphin's COM Support tu use MAPI.


Udo


Reply | Threaded
Open this post in threaded view
|

Re: Sending email from Dolphin ?

Jeffrey Odell-2
In reply to this post by Panu Viljamaa-3
I've used the components from Quiksoft (http://www.quiksoft.com) in
production, specifically the SMTP component.  I wrapped it in VA Smalltalk
in my case, but also wrapped the POP3 component with Dolphin.

These will cost you some change, but for me they have been rock solid.

jlo

"Panu Viljamaa" <[hidden email]> wrote in message
news:[hidden email]...
> Ken Lee wrote:
>
> > ...
> > ShellLibrary default shellOpen: 'mailto:[hidden email]?subject=This is the
> > subject&body=This is the body'
>
> This is nifty. Thanks.  However, I'm really looking into ways of sending
the
> email automatically, without human interaction. Any pointers ? Do I need
to
> program SMTP support myself, or is there perhaps a library somewhere ?
>
> Thanks
> Panu Viljamaa
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Sending email from Dolphin ?

Steve Waring-2
In reply to this post by Panu Viljamaa-3
Hi Panu,

I have done a rough port of the Squeak SMTPSocket and POPSocket classes, as
well as a couple of the MIME encoding/decoding classes.

It is doing what I need, but needs work and testing. If you are interested
in what I have so far, email me at [hidden email] and I will send it
through.

Thanks,
Steve
www.dolphinharbor.org


Reply | Threaded
Open this post in threaded view
|

Re: Sending email from Dolphin ?

Blair McGlashan
In reply to this post by Panu Viljamaa-3
Panu

You wrote in message news:[hidden email]...
> Is there a way(s) to send email from within a Dolphin program ?

One way is to use the Active-X component wizard to create wrappings for
Microsoft's Collaboration Data Objects (CDO). Now there seem to be a number
of versions of this component, but we have wrapped that described as
"Microsoft CDO for Windows 2000" library with some success. If you aren't
running 2k or XP, lookout for the component that defines interfaces such as
IMessage, IMessages, INNTPxxxx, ISMTPxxxx, &c.

With that done a message can be sent with simple code such as:

msg := CDOIMessage new.
msg
from: '[hidden email]';
to: '[hidden email]';
subject: 'Test';
textBody: 'This is a test';
Send.

It is possible to configure the SMTP mail server, etc, and I suggest
referring to the CDO documentation on msdn.microsoft.com (or the
"CDOSYS.CHM" compiled HTML help file if you have it).

Regards

Blair