Alaska Software Inc. - Write a HTML E-Mail
Username: Password:
AuthorTopic: Write a HTML E-Mail
CesconWrite a HTML E-Mail
on Fri, 08 Nov 2002 09:04:12 +0100
Hello,

can someone tell me how can I write/edit a HTML E-Mail in a XbpMLE as
sample.

best regards
Cescon
phil@idep.org.uk Re: Write a HTML E-Mail
on Fri, 08 Nov 2002 10:04:38 +0000
>can someone tell me how can I write/edit a HTML E-Mail in a XbpMLE as
>sample.

Well, you can only do it by typing in the HTML code, so it would look
like this:

<html><head>
<title>Mailshot!</title>
</head><body>
<h1>Welcome</h1>
Download a demo of
<a href="ftp://ftp.myserver.com/pub/myapp/demo.zip">SuperApp</a>
</body></html>

I guess what you want is a wysiwyg editor, in which case I suggest you
use JazzAge and some relevant component (Word, FP etc.)

Regards,

Phil Ide

Xbase++ FAQ
current release: 8,  Monday 4th February 2002, 14:54
***
* Xbase++ FAQ:
*  online  : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm
*          : www.software-braun.de/xbfaq/xbfaq.htm 
*  download: http://www.idep.org.uk/xbase/xbfaq.zip
*          : www.software-braun.de/xbfaq/xbfaq.zip 
***
Thomas Braun
Re: Write a HTML E-Mail
on Fri, 08 Nov 2002 11:42:31 +0100
Cescon wrote:
> can someone tell me how can I write/edit a HTML E-Mail in a XbpMLE as
> sample.

You can't.

XbpMLE can display RTF formatted files and that's it.

I would not recommend anyone to use html as an email format:

http://www.georgedillon.com/web/html_email_is_evil.shtml

in german:

http://www.kaipahl.de/brain/html_ist_boese.html

regards
Thomas Braun

web: www.software-braun.de / email: nospam@wegasoft.de
If you need to send email, substitute "nospam" with my initials
since the spam account is not checked on a regular basis.
Xbase++ FAQ : faq.xbasecentral.net
Frans VermeulenRe: Write a HTML E-Mail
on Fri, 08 Nov 2002 13:13:58 +0100
Thomas,

> I would not recommend anyone to use html as an email format:
>
> http://www.georgedillon.com/web/html_email_is_evil.shtml

I agree with you 100%, HTML-mail with respect to viruses is like feeding
the rats in the sewer, and hope you won't get the plague, however....

I think it's time to come to the real world. Even Redhat sends me it's
update notifications, newsletters and other notifications in HTML-email.
Several newsgroups I regularly visit, are Web-newsgroups, so you could
say, they are HTML-only. Outlook-express does send emails out in HTML,
unless you watch very careful with every email you send, if Mr. Bill hasn't
changed the Email layout setting without notification. (believe me, I really
check that regularly). The same applies to KMail, and I don't know about
Mac, but that will probably not be any different.

I know what you mean, but..., to use a -I hope not too typical- Dutch saying:
The dike is breaking...

Regards,
Frans Vermeulen
Thomas Braun
Re: Write a HTML E-Mail
on Fri, 08 Nov 2002 14:42:53 +0100
Frans Vermeulen wrote:

> I think it's time to come to the real world. Even Redhat sends me it's
> update notifications, newsletters and other notifications in
> HTML-email.

Maybe they are thinking that most of the recipients do not use problematic
mail clients, who knows. But they should be the ones to know better 

> Several newsgroups I regularly visit, are Web-newsgroups,
> so you could say, they are HTML-only.

No problem with that. HTML was created for the *web*, not for email!

> Outlook-express does send emails out in HTML, unless you watch very
> careful with every email you send,

From my experience this can be configured very well. Since I changed this
at my Sister's company, I have never received any hmtl email from any of
the employees.

I'm using TheBat which can't create html emails at all, which is no problem
at all. I'm missing nothing. It is fast and efficient. Too much features
tempts people to "play" with them instead of using.

> I know what you mean, but..., to use a -I hope not too typical- Dutch
> saying: The dike is breaking...

Despite I do not live at the sea, I understand what you mean 


regards
Thomas Braun

web: www.software-braun.de / email: nospam@wegasoft.de
If you need to send email, substitute "nospam" with my initials
since the spam account is not checked on a regular basis.
Xbase++ FAQ : faq.xbasecentral.net
James LoughnerRe: Write a HTML E-Mail
on Fri, 08 Nov 2002 10:50:25 -0500
If someone sends me HTML Email it goes to the grabage bin with the rest of
the SPAM.

Jim
Anand GuptaRe: Write a HTML E-Mail
on Wed, 13 Nov 2002 20:50:27 +0530
Hi Thomas

Even I hate to use HTML mails.

I have been thinking on what format shall one use while providing an option
to email "reports" in the software.
I have been working on generatng PDF reports, but most of the users
responses to our 1st Preview update preferred HTML mail, as they can send a
"pre-formatted", "colourful", "Aligned" reports via email to other users
intra as well as inter-company.

Anand

"Thomas Braun" <nospam@wegasoft.de> wrote in message
news:3dcbbf5d$1@asgcom.alaska-software.com...
> Frans Vermeulen wrote:
>
> > I think it's time to come to the real world. Even Redhat sends me it's
> > update notifications, newsletters and other notifications in
> > HTML-email.
>
> Maybe they are thinking that most of the recipients do not use problematic
> mail clients, who knows. But they should be the ones to know better 
>
> > Several newsgroups I regularly visit, are Web-newsgroups,
> > so you could say, they are HTML-only.
>
> No problem with that. HTML was created for the *web*, not for email!
>
> > Outlook-express does send emails out in HTML, unless you watch very
> > careful with every email you send,
>
> From my experience this can be configured very well. Since I changed this
> at my Sister's company, I have never received any hmtl email from any of
> the employees.
>
> I'm using TheBat which can't create html emails at all, which is no
problem
> at all. I'm missing nothing. It is fast and efficient. Too much features
> tempts people to "play" with them instead of using.
>
> > I know what you mean, but..., to use a -I hope not too typical- Dutch
> > saying: The dike is breaking...
>
> Despite I do not live at the sea, I understand what you mean 
>
>
> regards
> Thomas Braun
> --
> web: www.software-braun.de / email: nospam@wegasoft.de
> If you need to send email, substitute "nospam" with my initials
> since the spam account is not checked on a regular basis.
> Xbase++ FAQ : faq.xbasecentral.net
phil@idep.org.uk Re: Write a HTML E-Mail
on Thu, 14 Nov 2002 08:51:56 +0000
>I have been thinking on what format shall one use while providing an option
>to email "reports" in the software.
>I have been working on generatng PDF reports, but most of the users
>responses to our 1st Preview update preferred HTML mail, as they can send a
>"pre-formatted", "colourful", "Aligned" reports via email to other users
>intra as well as inter-company.

RTF?

Regards,

Phil Ide

Xbase++ FAQ
current release: 8,  Monday 4th February 2002, 14:54
***
* Xbase++ FAQ:
*  online  : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm
*          : www.software-braun.de/xbfaq/xbfaq.htm 
*  download: http://www.idep.org.uk/xbase/xbfaq.zip
*          : www.software-braun.de/xbfaq/xbfaq.zip 
***
Anand GuptaRe: Write a HTML E-Mail
on Sat, 23 Nov 2002 14:08:03 +0530
Hi Phil

Sorry for responding quite late. Am still to join work.

Can RTF be shown in OE/Eudora in their preview window by default or so ? I
mean most of the customers seems to be happy emailing their Purchase Orders
etc. directly from our applications to their vendors. Quite a few uses the
Daily Fund/Sales/Inventory etc Position report to be emailed automatically
to their regional head in HTML format itself, as the receipent can see the
daily report from their Mail reader itself, Print from their if needed (most
of the time they need the INFO only for a quick glance).

Anand

NB: We had a baby boy last week.

"Phil Ide" <phil@idep.org.uk> wrote in message
news:3dd3641d.7941769@news.alaska-software.com...
> >I have been thinking on what format shall one use while providing an
option
> >to email "reports" in the software.
> >I have been working on generatng PDF reports, but most of the users
> >responses to our 1st Preview update preferred HTML mail, as they can send
a
> >"pre-formatted", "colourful", "Aligned" reports via email to other users
> >intra as well as inter-company.
>
> RTF?
>
> Regards,
>
> --
> Phil Ide
phil@idep.org.uk Re: Write a HTML E-Mail
on Sun, 24 Nov 2002 19:10:42 +0000
>Can RTF be shown in OE/Eudora in their preview window by default or so ? I

OE (and Outlook) will display RTF quite happily. I'm not sure about
Eudora as I don't use it, but I believe it does.

Regards,

Phil Ide

Xbase++ FAQ
current release: 8,  Monday 4th February 2002, 14:54
***
* Xbase++ FAQ:
*  online  : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm
*          : www.software-braun.de/xbfaq/xbfaq.htm 
*  download: http://www.idep.org.uk/xbase/xbfaq.zip
*          : www.software-braun.de/xbfaq/xbfaq.zip 
***
Anand GuptaRe: Write a HTML E-Mail
on Mon, 25 Nov 2002 19:34:56 +0530
Wow that sounds kool.

I recollect last time I started converting all my reports from HTML to RTF I
got stuck with "alighments" while creating "Tables".
Phil can you throw some light if there is a way we can "right align"
Numerics in RTF ?

Thanks

Anand


"Phil Ide" <phil@idep.org.uk> wrote in message
news:3de12408.4511477@news.alaska-software.com...
> >Can RTF be shown in OE/Eudora in their preview window by default or so ?
I
>
> OE (and Outlook) will display RTF quite happily. I'm not sure about
> Eudora as I don't use it, but I believe it does.
>
> Regards,
>
> --
> Phil Ide
>
> Xbase++ FAQ
> current release: 8,  Monday 4th February 2002, 14:54
> ***
> * Xbase++ FAQ:
> *  online  : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm
> *          : www.software-braun.de/xbfaq/xbfaq.htm
> *  download: http://www.idep.org.uk/xbase/xbfaq.zip
> *          : www.software-braun.de/xbfaq/xbfaq.zip
> ***
phil@idep.org.uk Re: Write a HTML E-Mail
on Mon, 25 Nov 2002 15:17:17 +0000
>Wow that sounds kool.
>
>I recollect last time I started converting all my reports from HTML to RTF I
>got stuck with "alighments" while creating "Tables".
>Phil can you throw some light if there is a way we can "right align"
>Numerics in RTF ?

Ok, first off, as you have probably discovered, 'tables' don't
actually exist in RTF - they are 'emulated' by aligning paragraphs
with borders.

Looking at some RTF documents I've been using, it looks like
'\adjustright' might be the one for you, but these also appear to be
used in alignment and are used right after the \pard\plain symbols:
 \ql	- align left?
 \qc	- justify?
 \qr	- align right?

e.g. \pard\plain \ql

I make things a lot easier for myself;

Firstly, I write an RTF document in Word.  Where I want the data to
appear, I place '<[x]>' (without the quotes) where 'x' is any valid
Xbase++ expression.

I then extract each occurrence of '<[.*]>' (using XbPCRE), turn the
expression into a code-block, evaluate it and stuff the result in
place of the original marker.  I took this idea straight from the RTF
class on ACSN, but using XbPCRE is tens of thousands of times faster.

I also use partial RTF documents - that is, a single page (without
document header/footer), which can be inserted in an existing
document.

The following code extracts the pages from a document (requires
XbPCRE.DLL):

/*****************************
* Source : rtf2prtf.prg           
* System : <unkown>           
* Author : Phil Ide           
* Created: 22/11/2002             
                             
 Purpose:                    
* ----------------------------
* History:                    
* ----------------------------
*    22/11/2002 16:19 PPI - Created                
*****************************/
                              
#include "Common.ch"
#include "Appevent.ch"        
#include "xbpcre.ch"

function dbesys()
return 0

function main(cInFile,cOutFile)
   local cPartialRTF
   local lOk := FALSE

   if CheckParms(cInFile,cOutFile)
      cPartialRTF := RtfExtract(cInFile)
      if !Empty(cPartialRTF)
         lOk := SavePartialRTF(cPartialRTF,cOutFile)
      endif
   endif
   if !lOk
      ErrorLevel(1)
   endif
   return 0

Function CheckParms(p1,p2)
   local lOk := FALSE

   if !valtype(p1) == 'C'
      Help()
   elseif !FExists(p1)
      ? p1+': File not found.'
   elseif !valtype(p2) == 'C'
      Help()
   else
      lOk := TRUE
   endif
   return lOk

Function Help()
   ? 'RTF-2-PRTF'
   ? 'Extracts pages from RTF document to create Partial RTF'
   ?
   ? 'Usage: <InputFile> <OutputFile>'
   ? '       - extensions are required'
   ?
   return 0

Function RtfExtract(cIn)
   local cBuff := memoread(cIn)
   local oReg := RegExp():new('\\pard')
   local aRet
   local i
   local cRet := ''

   if oReg:exec(cBuff) > 0
      aRet := oReg:result(1)
      cBuff := substr(cBuff,aRet[1])
      i := rat('}',cBuff)
      cBuff := left(cBuff,i-1)
      cRet := cBuff
   endif
   return cRet

Function SavePartialRTF(cPartialRTF,cOutFile)
   local nHnd := fcreate(cOutFile)
   local lOk := FALSE

   if nHnd > 0
      lOk := (fwrite(nHnd,cPartialRTF) == len(cPartialRTF))
      fclose(nHnd)
   endif
   return lOk


Phil Ide

Xbase++ FAQ
current release: 8,  Monday 4th February 2002, 14:54
***
* Xbase++ FAQ:
*  online  : http://www.idep.org.uk/xbase/xbfaq/xbfaq.htm
*          : www.software-braun.de/xbfaq/xbfaq.htm 
*  download: http://www.idep.org.uk/xbase/xbfaq.zip
*          : www.software-braun.de/xbfaq/xbfaq.zip 
***
Anand GuptaRe: Write a HTML E-Mail
on Fri, 29 Nov 2002 20:28:58 +0530
Wow cool. Must start looking back into RTF again  I went off-track
searching Table feature those days in RTF and letting it go....

Thanks much Phil.

Anand

"Phil Ide" <phil@idep.org.uk> wrote in message
news:3de23c12.20370631@news.alaska-software.com...
> >Wow that sounds kool.
> >
> >I recollect last time I started converting all my reports from HTML to
RTF I
> >got stuck with "alighments" while creating "Tables".
> >Phil can you throw some light if there is a way we can "right align"
> >Numerics in RTF ?
>
<snip>
Jose Luis OterminRe: Write a HTML E-Mail
on Sun, 01 Dec 2002 13:46:47 -0300
> NB: We had a baby boy last week.
Hey!
Are you telling us you are dad?
If yes, congratulations!
If not, please explain it better 

Kind Regards from Argentina

--
 Jos Luis Otermin

oterminATciudad.com.ar
Anand GuptaRe: Write a HTML E-Mail
on Mon, 02 Dec 2002 11:18:23 +0530
Yeah I became dad 2 week ago 
Thanks

Anand

"Jose Luis Otermin" <otermin@yahoo.com> wrote in message
news:3dea3c61@asgcom.alaska-software.com...
> > NB: We had a baby boy last week.
> Hey!
> Are you telling us you are dad?
> If yes, congratulations!
> If not, please explain it better 
>
> Kind Regards from Argentina
>
> --
>  Jos Luis Otermin
>
> oterminATciudad.com.ar
>
>
>
>
Frans VermeulenRe: Write a HTML E-Mail
on Mon, 02 Dec 2002 10:47:05 +0100
Anand,

> Yeah I became dad 2 week ago 

That's better, not so humble about it, your first announcement was so small, I had overlooked it 

Congratulations,

Frans Vermeulen
Anand GuptaRe: Write a HTML E-Mail
on Fri, 06 Dec 2002 13:17:26 +0530
Thankx Frans

Anand

"Frans Vermeulen" <fvermeulen@ehp.nl> wrote in message
news:3deb2aa4$1@asgcom.alaska-software.com...
> Anand,
>
> > Yeah I became dad 2 week ago 
>
> That's better, not so humble about it, your first announcement was so
small, I had overlooked it 
>
> Congratulations,
>
> Frans Vermeulen
CesconRe: Write a HTML E-Mail
on Fri, 08 Nov 2002 17:07:39 +0100
Nothing helps,
if the customers cannot live without HTML E-Mail.

"Thomas Braun" <nospam@wegasoft.de> schrieb im Newsbeitrag
news:3dcb9517@asgcom.alaska-software.com...
> Cescon wrote:
> > can someone tell me how can I write/edit a HTML E-Mail in a XbpMLE as
> > sample.
>
> You can't.
>
> XbpMLE can display RTF formatted files and that's it.
>
> I would not recommend anyone to use html as an email format:
>
> http://www.georgedillon.com/web/html_email_is_evil.shtml
>
> in german:
>
> http://www.kaipahl.de/brain/html_ist_boese.html
>
> regards
> Thomas Braun
> --
> web: www.software-braun.de / email: nospam@wegasoft.de
> If you need to send email, substitute "nospam" with my initials
> since the spam account is not checked on a regular basis.
> Xbase++ FAQ : faq.xbasecentral.net
Jim GrahamRe: Write a HTML E-Mail
on Tue, 28 Jan 2003 15:14:29 -0500
I use the MarshallSoft POP3/SMTP libraries from:
http://www.marshallsoft.com/

I use these to send Text as well as HTML emails along with file attachments
if required.

The following code should give you some idea of how to do it with the
Marshallsoft library:

Function SendMail( pcSmtpServer, pcSmtpFrom, pcSmtpTo, pcSubject, pcMessage,
pcAttachment1, pcAttachment2,pbUrgent,pbHTML )

  LOCAL lbStatus     := .F.
  LOCAL lcAttachments:= ""
  LOCAL lcCcList     := ""
  LOCAL lcBCCList    := ""
  LOCAL lcDebugLevel := GetGlobal("DEBUG_LEVEL")
  Local lcHTMLFile   :=  "@" + pcMessage
  Local lcSMTPReply  := ""
  LOCAL lcMessage
  LOCAL lcBuffer
  LOCAL lnCode
  LOCAL lcDiagFile

  /*
      Notes: pcSMTPTO can have multiples: The Develper
1<jgraham@proteledata.com> , The Develper 2<jgraham@proteledata.com>
             CC and BCC are the same as to
             Attach can have multiple file names separated by commas as well

  */

  DEFAULT pcSmtpServer  To GetGlobal("SMTP_SERVER")
  DEFAULT pcSmtpFrom    To GetGlobal("FROM_EMAIL")
  DEFAULT pcAttachment1 To ""
  DEFAULT pcAttachment2 To ""
  DEFAULT pbUrgent      To .F.
  DEFAULT pbHTML        To .F.

  If DEF_DEBUG_EMAIL $ lcDebugLevel
     lcMessage := "Begin E-Mail process to: " + pcSmtpTo
     DCQOUT lcMessage
     PostLogFile( CRLF + lcMessage , .T.)
  Endif

  Begin Sequence

    If File(pcAttachment1)
       lcAttachments += ALLTRIM(pcAttachment1)
    Endif
    If FILE(pcAttachment2)
       lcAttachments += "," + ALLTRIM(pcAttachment2)
    Endif

    //lcSmtpReply := pcSmtpFrom

    If DEF_DEBUG_EMAIL $ lcDebugLevel

       lcMessage := "   Server: " + pcSmtpServer
       DCQOUT lcMessage
       PostLogFile( CRLF + lcMessage , .T.)

       lcMessage := "   From: " + pcSmtpFrom
       DCQOUT lcMessage
       PostLogFile( CRLF + lcMessage , .T.)

       lcMessage := "   To: " + pcSmtpTo
       DCQOUT lcMessage
       PostLogFile( CRLF + lcMessage , .T.)

       lcMessage := "   Subject: " + pcSubject
       DCQOUT lcMessage
       PostLogFile( CRLF + lcMessage , .T.)

       lcMessage := "   Priority: " + If(pbUrgent, "Urgent","Normal")
       DCQOUT lcMessage
       PostLogFile( CRLF + lcMessage , .T.)

       lcMessage := "   Format: " + If(pbHTML, "HTML","Text")
       DCQOUT lcMessage
       PostLogFile( CRLF + lcMessage , .T.)

       If pbHTML
          lcMessage := "   HTML File: " + lcHTMLFile
          DCQOUT lcMessage
          PostLogFile( CRLF + lcMessage , .T.)
       Endif

       lcMessage := "   Attachments: " + If( Empty(lcAttachments) , "None" ,
lcAttachments )
       DCQOUT lcMessage
       PostLogFile( CRLF + lcMessage , .T.)

       lcMessage := "       Message: " + pcMessage
       DCQOUT lcMessage
       PostLogFile( CRLF + lcMessage , .T.)


    Endif

    * Note 1: Use full path names unless file is located in Xbase++
directory.
    * Note 2: Note the leading '@' character in Message.
    * Note 3: Verify the location of all referenced files.

    lcDiagFile = StrTran( GetGlobal("MAIL_LOG_PATH") + "\EMAIL.LOG"
,"\\","\" )

    If ! File("SEE32.dll")
       lcMessage := "   SEE32.DLL not found!"
       If DEF_DEBUG_EMAIL $ lcDebugLevel
          DCQOUT lcMessage
       Endif
       PostLogFile( CRLF + lcMessage )
       Break
    Endif

    lnCode = XseeAttach(1, SEE_KEY_CODE)

    If lnCode < 0
       lcMessage := "   Failure to attach to SEE32.DLL"
       If DEF_DEBUG_EMAIL $ lcDebugLevel
          DCQOUT lcMessage
       Endif
       PostLogFile( CRLF + lcMessage )
       Break
    Endif

    lnCode = XseeStringParam(0, SEE_LOG_FILE, @lcDiagFile)

    If lnCode < 0
       lcMessage := "   Failure to set log file to: " + lcDiagFile
       If DEF_DEBUG_EMAIL $ lcDebugLevel
          DCQOUT lcMessage
       Endif
       PostLogFile( CRLF + lcMessage )
    Endif

    If pbUrgent
       lnCode = XseeStringParam(0, SEE_ADD_HEADER, "X-Priority: 1
(Highest)")
       If lnCode < 0
          lcMessage := "   Failure to set E-mail header to: " + "X-Priority:
1 (Highest)"
          If DEF_DEBUG_EMAIL $ lcDebugLevel
             DCQOUT lcMessage
          Endif
          PostLogFile( CRLF + lcMessage )
       Endif
    Endif

    If pbHTML
       lnCode = XseeIntegerParam(0, SEE_QUOTED_PRINTABLE, QUOTED_HTML)
       //DCQOUT "HTML EMAIL"
    Else
       lnCode = XseeIntegerParam(0, SEE_QUOTED_PRINTABLE, QUOTED_PLAIN)
       //DCQOUT "TEXT EMAIL"
    Endif

    If lnCode < 0
       lcMessage := "   Failure to set parameters for: SEE_QUOTED_PRINTABLE,
QUOTED_PLAIN"
       If DEF_DEBUG_EMAIL $ lcDebugLevel
          DCQOUT lcMessage
       Endif
       PostLogFile( CRLF + lcMessage )
    Endif

    lnCode = XseeSmtpConnect(0, @pcSmtpServer, @pcSmtpFrom, @lcSmtpReply)

    If lnCode < 0
       lcBuffer = SPACE(128)
       XseeErrorText(0,lnCode,@lcBuffer,128)
       lcMessage := "   Failure to connect to SMTP Server: " + pcSmtpServer
+ " error message: " + AllTrim(lcBuffer)
       If DEF_DEBUG_EMAIL $ lcDebugLevel
          DCQOUT lcMessage
       Endif
       PostLogFile( CRLF + lcMessage )
       Break
    Endif

    lnCode =
XseeSendEmail(0,@pcSmtpTo,@lcCcList,@lcBCCList,@pcSubject,@pcMessage,@lcAtta
chments)
    If lnCode < 0
       lcBuffer = SPACE(128)
       lnCode = XseeErrorText(0,lnCode,@lcBuffer,128)
       lcMessage := "   Failure to send e-mail, error message: " +
AllTrim(lcBuffer)
       If DEF_DEBUG_EMAIL $ lcDebugLevel
          DCQOUT lcMessage
       Endif
      PostLogFile( CRLF + lcMessage )
    Else
      lbStatus := .T.
    Endif

  End Sequence

  XseeClose(0)
  XseeRelease()

  If DEF_DEBUG_EMAIL $ lcDebugLevel
     lcMessage := "End E-Mail process to: " + pcSmtpTo + If(lbStatus,"
Successfully", " Un-successfully")
     DCQOUT lcMessage
     PostLogFile( CRLF + lcMessage , .T.)
  Endif

RETURN lbStatus



"Cescon" <cescon@soyubey.de> wrote in message
news:3dcb6e65$1@asgcom.alaska-software.com...
> Hello,
>
> can someone tell me how can I write/edit a HTML E-Mail in a XbpMLE as
> sample.
>
> best regards
> Cescon
>
>
CesconRe: Write a HTML E-Mail
on Wed, 29 Jan 2003 09:46:01 +0100
Hello,

thanks for replay, but I get it with "see" too, but how to edit the E-Mail
with XbpMLE.

regards
Cescon

"Jim Graham" <jgraham@proteledata.com> schrieb im Newsbeitrag
news:3e36e2ed$1@asgcom.alaska-software.com...
> I use the MarshallSoft POP3/SMTP libraries from:
> http://www.marshallsoft.com/
>
> I use these to send Text as well as HTML emails along with file
attachments
> if required.
>
> The following code should give you some idea of how to do it with the
> Marshallsoft library:
>
> Function SendMail( pcSmtpServer, pcSmtpFrom, pcSmtpTo, pcSubject,
pcMessage,
> pcAttachment1, pcAttachment2,pbUrgent,pbHTML )
>
>   LOCAL lbStatus     := .F.
>   LOCAL lcAttachments:= ""
>   LOCAL lcCcList     := ""
>   LOCAL lcBCCList    := ""
>   LOCAL lcDebugLevel := GetGlobal("DEBUG_LEVEL")
>   Local lcHTMLFile   :=  "@" + pcMessage
>   Local lcSMTPReply  := ""
>   LOCAL lcMessage
>   LOCAL lcBuffer
>   LOCAL lnCode
>   LOCAL lcDiagFile
>
>   /*
>       Notes: pcSMTPTO can have multiples: The Develper
> 1<jgraham@proteledata.com> , The Develper 2<jgraham@proteledata.com>
>              CC and BCC are the same as to
>              Attach can have multiple file names separated by commas as
well
>
>   */
>
>   DEFAULT pcSmtpServer  To GetGlobal("SMTP_SERVER")
>   DEFAULT pcSmtpFrom    To GetGlobal("FROM_EMAIL")
>   DEFAULT pcAttachment1 To ""
>   DEFAULT pcAttachment2 To ""
>   DEFAULT pbUrgent      To .F.
>   DEFAULT pbHTML        To .F.
>
>   If DEF_DEBUG_EMAIL $ lcDebugLevel
>      lcMessage := "Begin E-Mail process to: " + pcSmtpTo
>      DCQOUT lcMessage
>      PostLogFile( CRLF + lcMessage , .T.)
>   Endif
>
>   Begin Sequence
>
>     If File(pcAttachment1)
>        lcAttachments += ALLTRIM(pcAttachment1)
>     Endif
>     If FILE(pcAttachment2)
>        lcAttachments += "," + ALLTRIM(pcAttachment2)
>     Endif
>
>     //lcSmtpReply := pcSmtpFrom
>
>     If DEF_DEBUG_EMAIL $ lcDebugLevel
>
>        lcMessage := "   Server: " + pcSmtpServer
>        DCQOUT lcMessage
>        PostLogFile( CRLF + lcMessage , .T.)
>
>        lcMessage := "   From: " + pcSmtpFrom
>        DCQOUT lcMessage
>        PostLogFile( CRLF + lcMessage , .T.)
>
>        lcMessage := "   To: " + pcSmtpTo
>        DCQOUT lcMessage
>        PostLogFile( CRLF + lcMessage , .T.)
>
>        lcMessage := "   Subject: " + pcSubject
>        DCQOUT lcMessage
>        PostLogFile( CRLF + lcMessage , .T.)
>
>        lcMessage := "   Priority: " + If(pbUrgent, "Urgent","Normal")
>        DCQOUT lcMessage
>        PostLogFile( CRLF + lcMessage , .T.)
>
>        lcMessage := "   Format: " + If(pbHTML, "HTML","Text")
>        DCQOUT lcMessage
>        PostLogFile( CRLF + lcMessage , .T.)
>
>        If pbHTML
>           lcMessage := "   HTML File: " + lcHTMLFile
>           DCQOUT lcMessage
>           PostLogFile( CRLF + lcMessage , .T.)
>        Endif
>
>        lcMessage := "   Attachments: " + If( Empty(lcAttachments) , "None"
,
> lcAttachments )
>        DCQOUT lcMessage
>        PostLogFile( CRLF + lcMessage , .T.)
>
>        lcMessage := "       Message: " + pcMessage
>        DCQOUT lcMessage
>        PostLogFile( CRLF + lcMessage , .T.)
>
>
>     Endif
>
>     * Note 1: Use full path names unless file is located in Xbase++
> directory.
>     * Note 2: Note the leading '@' character in Message.
>     * Note 3: Verify the location of all referenced files.
>
>     lcDiagFile = StrTran( GetGlobal("MAIL_LOG_PATH") + "\EMAIL.LOG"
> ,"\\","\" )
>
>     If ! File("SEE32.dll")
>        lcMessage := "   SEE32.DLL not found!"
>        If DEF_DEBUG_EMAIL $ lcDebugLevel
>           DCQOUT lcMessage
>        Endif
>        PostLogFile( CRLF + lcMessage )
>        Break
>     Endif
>
>     lnCode = XseeAttach(1, SEE_KEY_CODE)
>
>     If lnCode < 0
>        lcMessage := "   Failure to attach to SEE32.DLL"
>        If DEF_DEBUG_EMAIL $ lcDebugLevel
>           DCQOUT lcMessage
>        Endif
>        PostLogFile( CRLF + lcMessage )
>        Break
>     Endif
>
>     lnCode = XseeStringParam(0, SEE_LOG_FILE, @lcDiagFile)
>
>     If lnCode < 0
>        lcMessage := "   Failure to set log file to: " + lcDiagFile
>        If DEF_DEBUG_EMAIL $ lcDebugLevel
>           DCQOUT lcMessage
>        Endif
>        PostLogFile( CRLF + lcMessage )
>     Endif
>
>     If pbUrgent
>        lnCode = XseeStringParam(0, SEE_ADD_HEADER, "X-Priority: 1
> (Highest)")
>        If lnCode < 0
>           lcMessage := "   Failure to set E-mail header to: " +
"X-Priority:
> 1 (Highest)"
>           If DEF_DEBUG_EMAIL $ lcDebugLevel
>              DCQOUT lcMessage
>           Endif
>           PostLogFile( CRLF + lcMessage )
>        Endif
>     Endif
>
>     If pbHTML
>        lnCode = XseeIntegerParam(0, SEE_QUOTED_PRINTABLE, QUOTED_HTML)
>        //DCQOUT "HTML EMAIL"
>     Else
>        lnCode = XseeIntegerParam(0, SEE_QUOTED_PRINTABLE, QUOTED_PLAIN)
>        //DCQOUT "TEXT EMAIL"
>     Endif
>
>     If lnCode < 0
>        lcMessage := "   Failure to set parameters for:
SEE_QUOTED_PRINTABLE,
> QUOTED_PLAIN"
>        If DEF_DEBUG_EMAIL $ lcDebugLevel
>           DCQOUT lcMessage
>        Endif
>        PostLogFile( CRLF + lcMessage )
>     Endif
>
>     lnCode = XseeSmtpConnect(0, @pcSmtpServer, @pcSmtpFrom, @lcSmtpReply)
>
>     If lnCode < 0
>        lcBuffer = SPACE(128)
>        XseeErrorText(0,lnCode,@lcBuffer,128)
>        lcMessage := "   Failure to connect to SMTP Server: " +
pcSmtpServer
> + " error message: " + AllTrim(lcBuffer)
>        If DEF_DEBUG_EMAIL $ lcDebugLevel
>           DCQOUT lcMessage
>        Endif
>        PostLogFile( CRLF + lcMessage )
>        Break
>     Endif
>
>     lnCode =
>
XseeSendEmail(0,@pcSmtpTo,@lcCcList,@lcBCCList,@pcSubject,@pcMessage,@lcAtta
> chments)
>     If lnCode < 0
>        lcBuffer = SPACE(128)
>        lnCode = XseeErrorText(0,lnCode,@lcBuffer,128)
>        lcMessage := "   Failure to send e-mail, error message: " +
> AllTrim(lcBuffer)
>        If DEF_DEBUG_EMAIL $ lcDebugLevel
>           DCQOUT lcMessage
>        Endif
>       PostLogFile( CRLF + lcMessage )
>     Else
>       lbStatus := .T.
>     Endif
>
>   End Sequence
>
>   XseeClose(0)
>   XseeRelease()
>
>   If DEF_DEBUG_EMAIL $ lcDebugLevel
>      lcMessage := "End E-Mail process to: " + pcSmtpTo + If(lbStatus,"
> Successfully", " Un-successfully")
>      DCQOUT lcMessage
>      PostLogFile( CRLF + lcMessage , .T.)
>   Endif
>
> RETURN lbStatus
>
>
>
> "Cescon" <cescon@soyubey.de> wrote in message
> news:3dcb6e65$1@asgcom.alaska-software.com...
> > Hello,
> >
> > can someone tell me how can I write/edit a HTML E-Mail in a XbpMLE as
> > sample.
> >
> > best regards
> > Cescon
> >
> >
>
>