GEMSTONE hangs when executing WAEmailMessage in readSmtpResult

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

GEMSTONE hangs when executing WAEmailMessage in readSmtpResult

Shyam Sundaresan
I have installed on my MAC with MACOSX Lion, in the latest version of Gemtools (1.0 beta 87) with the latest version of glass workspace (1.0 beta 8.7.4) and the latest version of GEMSTONE: 3.1.0.1. On this I have loaded Seaside using :


MCPlatformSupport commitOnAlmostOutOfMemoryDuring: [    
    Gofer project load: 'Seaside30' version: '3.0.7.1'.    

    Gofer new
    squeaksource: 'MetacelloRepository';
    package: 'ConfigurationOfMetacello';
    load.
    (Smalltalk at: #ConfigurationOfMetacello) perform: #load.


    Gofer new
    squeaksource: 'MetacelloRepository';
    package: 'ConfigurationOfSeasideRest';
    load.


].
ConfigurationOfSeasideRest project stableVersion load: 'Tests'


All work fine, but the system "hangs" if I attempt to evaluate this piece :

(WAEmailMessage
     from: (WAEmailAddress address: 'xx@aa.com' username: 'fromman')
     to: (WAEmailAddress address: 'shyam1.sundaresan1@gmail.com' username: 'shyam')
     subject: 'Email Test')  
          body: 'This is a Test Email sent';
          send.


With debug, I have seen that the place where it hangs is in SendMail >> send

send
    | rc |
    ^self isEnabled
    ifFalse: [self saveToFile]
    ifTrue: [ self halt.
        rc := self openTcpConnection.
        rc
            ifTrue:
                [   rc ifTrue: [rc := self readSmtpResult] "==> HANGS HERE ==>"
                rc ifTrue: [rc := self sendHelo].
                rc ifTrue: [rc := self readSmtpResult].
                rc ifTrue: [rc := self sendMailFrom].
                rc ifTrue: [rc := self readSmtpResult].


and specifically, it does not exit (for ever) from the following loop whileFalse in readSmtpResult:

readSmtpResult
| result firstChar |

    [self readWillNotBlockWithin: 5000]
        whileFalse: [GsFile stderr log: 'Waiting for server to write...'].


Using Telnet, that port connects well

shyam:opt shyam$ telnet mailhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 shyam.homenet.telecomitalia.it ESMTP Postfix


I have also inspected that the smtpHost, smtpPort, ownDomainName etc... are all correct. Have also noticed that nothing is written in the /var/log/mail.log

Besides, The same piece of code on a PHARO 1.4 engine + Seaside on the same machine works fine and using the following command line, the mail is correctly RELAYED through gmail.

echo 'It works' | mailx -s 'Test message' shyam1.sundaresan1@gmail.com 

Any indicators to help me overcome the impasse will be gratefully welcome.

Thanks

Shyam