ZdcSecureSMTPClient mail sending.

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

ZdcSecureSMTPClient mail sending.

irfankhan1
Hi i am trying to send mail using ZdcSecureSMTPClient class, here is the code i tried on workspace.
| mailMessage |
mailMessage := MailMessage empty.
mailMessage setField: 'subject' toString: 'ZdcSecureSMTPClient Test'.
mailMessage body: (MIMEDocument
                 contentType: 'text/plain'
                 content: 'This is test from Pharo Smalltalk').
ZdcSecureSMTPClient
sendUsingGMailAccount: 'sender@gmail.com'
password: 'mypass'
to: 'reciever@gmail.com'
message: mailMessage.

Everytime i try running this code , it gives me a debugger saying "connection timedout: cannot connect". I tried this with pharo 2.0 and pharo 3.0  on ubuntu OS both versions had the same problem, But this worked fine on windows 7 when i added SqueakSSL.dll. I am not sure if i need some ssl plugin for ubuntu??error
Reply | Threaded
Open this post in threaded view
|

Re: ZdcSecureSMTPClient mail sending.

Sven Van Caekenberghe-2

On 04 Jan 2014, at 04:41, irfankhan1 <[hidden email]> wrote:

> Hi i am trying to send mail using ZdcSecureSMTPClient class, here is the code
> i tried on workspace.
> | mailMessage |
> mailMessage := MailMessage empty.
> mailMessage setField: 'subject' toString: 'ZdcSecureSMTPClient Test'.
> mailMessage body: (MIMEDocument
>                 contentType: 'text/plain'
>                 content: 'This is test from Pharo Smalltalk').
> ZdcSecureSMTPClient
> sendUsingGMailAccount: '[hidden email]'
> password: 'mypass'
> to: '[hidden email]'
> message: mailMessage.
>
> Everytime i try running this code , it gives me a debugger saying
> "connection timedout: cannot connect". I tried this with pharo 2.0 and pharo
> 3.0  on ubuntu OS both versions had the same problem, But this worked fine
> on windows 7 when i added *SqueakSSL.dll*. I am not sure if i need some ssl
> plugin for ubuntu?? <http://forum.world.st/file/n4734027/1.png>

Yes, you need an SSL plugin next to the VM, the Pharo VM comes with the SSL plugin included.

What does

[ ZdcPluginSSLSession new destroy. true ]
    on: ZdcPluginMissing
    do: [ false ].

return (on Linux) ?

Do the unit tests for Zodiac pass (on Linux) ?

Sven


Reply | Threaded
Open this post in threaded view
|

Re: ZdcSecureSMTPClient mail sending.

irfankhan1
Ok, the test for plugin passes seems like thats not the problem, here is what i got when i run zodiac-Test.Error message
Reply | Threaded
Open this post in threaded view
|

Re: ZdcSecureSMTPClient mail sending.

Sven Van Caekenberghe-2

On 05 Jan 2014, at 19:34, irfankhan1 <[hidden email]> wrote:

> Ok, the test for plugin passes seems like thats not the problem, here is what
> i got when i run zodiac-Test. <http://forum.world.st/file/n4734424/2.png>

How did you install Pharo on Ubuntu ?

Like this ?

http://www.pharo-project.org/pharo-download/ubuntu

Or using this ?

http://get.pharo.org

AFAIK, all Zodiac test pass on the Linux (Ubuntu) slaves on the CI servers.

Sven