On 9/17/2009 10:44 AM, Lorenzo Fiorini wrote:
In contrib/hbtip/sendmail.prg these lines:

       IF !( Right( cBody, 2 ) == hb_osNewLine() )
          cBody += hb_osNewLine()
       ENDIF

should be:

       IF !( Right( cBody, 2 ) == Chr( 13 ) + Chr( 10 ) )
          cBody += Chr( 13 ) + Chr( 10 )
       ENDIF

the standard requires Cr+Lf and servers like QMail reject messages
with ONLY Lf reporting:

451 See http://pobox.com/~djb/docs/smtplf.html

while others like Postfix accept them but report:

354 End data with<CR><LF>.<CR><LF>

Using Chr( 13 ) + Chr( 10 ) seems to fix the send with QMail but
Postfix still reports 354 ...

Any comments is welcome.

best regards,
Lorenzo
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Your more than welcome to harvest my changes...
http://www.ask-services.com/tmp/mail.prg

There is more issues than just the crlf. The handling of attachments was broken also, along with encoding in xharbour was broken at one point.

I didn't commit my changes to (x)harbour as they were fairly extensive and it looked like it was working for others as is. My changes are heavily tested against postfix email server with sending from linux and windows binaries. One application probably sends 500+ emails a day with attachments.


--
Regards
--------------------------------------
Gerald Drouillard
Technology Architect
Drouillard & Associates, Inc.
http://www.Drouillard.biz
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to