[Gambas-user] SMTPClient message format issue

Benoit Minisini gambas at ...1...
Sun Jun 1 00:15:57 CEST 2008


On jeudi 29 mai 2008, Rob wrote:
> On Thursday 29 May 2008 09:32, Leonardo Miliani wrote:
> > Benoit said me that he based the smtp component on an old library
> > with less functions.. so until he has the time to rewrite it there
> > are no many solutions to get that component working.
>
> If what you want to send is a really plain plaintext message, I would
> personally just connect to the SMTP server directly and do something
> like:
>
> print #mysocket, "HELO localhost"
> print #mysocket, "MAIL FROM:<my at ...1320...>"
> print #mysocket, "RCPT TO:<aibo at ...1916...>"
> print #mysocket, "DATA"
> print #mysocket, "From: <my at ...1320...>"
> print #mysocket, "To: <aibo at ...1916...>"
> print #mysocket, "Date: " & format(now, "ddd, dd mmmm yyyy " & _
>     "hh:nn:ss -0500" ' change -0500 to be your own timezone
>     ' because i don't remember how to get the timezone in gambas
> print #mysocket, "Subject: " & subject
> print #mysocket, ""
> print #mysocket, bodytext
> print #mysocket, "."
>
> Rob
>

Well, then do not send messages in any other language than english, and/or 
outside of US! :-)

To get the timezone, you may do that:

PRINT Frac(CFloat(Date(Now))) * 24

-- 
Benoit Minisini




More information about the User mailing list