DEFINE MAIL .... HTML

DEFINE MAIL .... HTML

Postby cdmmaui » Mon Aug 15, 2011 3:38 pm

Hello,

Is it possible to use DEFINE MAIL and create HTML body in TEXT? I am using FWH 8.10.

DEFINE MAIL oMail ;
SUBJECT cSubject ;
TEXT cText ;
FROM USER ;
RECEIPT

Thank you,
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: DEFINE MAIL .... HTML

Postby James Bott » Mon Aug 15, 2011 3:57 pm

Darrell,

Don't use the TEXT. Create the HTML as a file, then specify the HTML file as an attachment, then it will appear as the body of the message.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: DEFINE MAIL .... HTML

Postby cdmmaui » Mon Aug 15, 2011 3:58 pm

Thank you James
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: DEFINE MAIL .... HTML

Postby cdmmaui » Thu Aug 18, 2011 5:57 pm

Hi James,

I would like to attach a file in addition to HTML file. I am getting a MAPI error 11 (attachment not found). Using the following code.

AADD( aStmnAttach, { cFText, cFText } )
AADD( aStmnAttach, { PA[25] + cPdf + '.pdf', PA[25] + cPdf + '.pdf' } )

_email( cEmail, cSubject, '', aStmnAttach )

//--------------------------------------------------------------
function _email( cTo, cSubject, cText, aEmFile )

DEFINE MAIL oMail ;
TO ALLTRIM(cTo) ;
SUBJECT cSubject ;
FROM USER ;
RECEIPT ;
FILES cEmFile
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: DEFINE MAIL .... HTML

Postby ukservice » Thu Aug 18, 2011 6:35 pm

Hello.

You have to use full path.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: DEFINE MAIL .... HTML

Postby cdmmaui » Thu Aug 18, 2011 6:42 pm

Hello,

Thank you, the values contain the full path...

AADD( aStmnAttach, { cFText, cFText } ) ---------------------------------------------------> c:\upload\test.htm
AADD( aStmnAttach, { PA[25] + cPdf + '.pdf', PA[25] + cPdf + '.pdf' } ) -----------------> c:\upload\A0001.pdf
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: DEFINE MAIL .... HTML

Postby James Bott » Thu Aug 18, 2011 9:31 pm

Darrell,

I have never tried both an HTML and another type of attachment at the same time. Have you tried two non-html attachments using your code? Does that work?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: DEFINE MAIL .... HTML

Postby cdmmaui » Thu Aug 18, 2011 9:43 pm

Hi James,

Yes, with a single attachment it works fine. Perhaps there is a limitation of one attachment?

Sincerely,
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: DEFINE MAIL .... HTML

Postby James Bott » Fri Aug 19, 2011 12:08 am

Darrell,

My question was, "Have you tried two non-html attachments using your code? Does that work?"

You might also try putting the PDF first and the HTML last. Just an idea...

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 53 guests