On Oct 25, 2005, at 11:55 AM, Aparajita Fishman wrote:
I use this code to send mail
a4d.utils.setSMTPHost ("mail.domainname.com")
a4d.utils.setSMTPAuthorization("[EMAIL PROTECTED]";"password")
a4d.utils.sendmail("mail.inc";"[EMAIL PROTECTED]";"[EMAIL PROTECTED]
com")
If mail.inc is a text file all is ok
But if mail.inc is an html file, mail program don't recognise html
code and parse it as a text file
To send html emails you have to send some extra headers and modify the
content. See RFC 1521.
http://www.freesoft.org/CIE/RFC/1521/index.htm
Think I asked this a few years ago. You do need additional headers and
should take a look at the RFC. My solution was to make a copy of
A4D_SendMail wrapper and modify the body part to:
If ($err=0)
If (Position("<html>";$inBody)>0)
$err:=SMTP_AddHeader ($smtp;"Content-Type:";"text/html;
charset=us-ascii";1)
If ($err=0)
$err:=SMTP_Body ($smtp;$inBody;1)
End if
Else
$err:=SMTP_Body ($smtp;$inBody;1)
End if
End if
Steve Alex
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/