[Seaside] How to email
Richard Eng
richard.eng at rogers.com
Tue Aug 14 14:56:33 UTC 2007
Here's a little blogging about it
http://blog.saush.com/?p=199
Ramon Leon
-------------
It looks very useful, but I'm still having problems. There is something
very BASIC that I'm doing wrong, apparently.
Following the blog, I'm using this code fragment:
| username password client |
username := 'richard.eng'.
password := 'Bugaboo'.
client := SMTPClient openOnHostNamed: 'smtp.broadband.rogers.com' port: 25.
client user: username; password: password; login; initiateSession.
client mailFrom: 'richard.eng at rogers.com';
recipient: 'richardeng2005 at hotmail.com';
data:
'Subject: Hello from SMTPClient!
From: richard.eng at rogers.com
To: richardeng2005 at hotmail.com
Sending from SMTPClient!'.
client quit.
The above chokes at #login. The debugger says:
TelnetProtocolError: 501 malformed auth input (#5.5.4)
Apparently it hits a problem at #checkResponse:
login
self user ifNil: [^self].
self sendCommand: 'AUTH LOGIN ' , (self encodeString: self user).
[self checkResponse]
on: TelnetProtocolError
do: [ :ex | ex isCommandUnrecognized ifTrue: [^ self] ifFalse: [ex pass]].
self sendCommand: (self encodeString: self password).
self checkResponse
I'm using the exact same username and password as in Evolution (with
which I'm sending this email). So why is it complaining about
"malformed auth input"???
One thought I had was that the SMTP server authenticates against the
POP server at Rogers, I believe (I could be wrong). Maybe this is the
problem?
Regards,
Richard
More information about the seaside
mailing list