HTML mail with Outlook

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

HTML mail with Outlook

Postby Bengt » Fri Aug 22, 2014 6:33 pm

When creating an E-mail from Preview, text format for the body text is set as plain text even if the format for new message is set to HTML in Outlook.

We don't add any text to the body from the program, but use the signature in Outlook to do that manually. However, we have a logotype in the signature that should be included, and therefore we need to send it as HTML. As it now is, the user have to click format text tab, choose HTML, click on the message tab and then choose the signature. We want to get rid of the first three mouse clicks. Is that possible?

Bengt
Bengt
 
Posts: 89
Joined: Fri Jan 27, 2006 5:29 pm

Re: HTML mail with Outlook

Postby IDEAL Software Support » Sat Aug 23, 2014 10:30 am

With VPE v7.0, you can force VPE to use Extended MAPI. In this case you can set the property MailText as written in the VPE Reference Manual:

If VPE is using Extended MAPI (see MAPIType), you can also use HTML or RTF for the body text of e-mail messages. For HTML the message text must begin with “<html>” and for RTF the message text must begin with “{\rtf”.


For an empty HTML message, use “<html></html>”. We haven't tested this, please provide feedback, if it works.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Re: HTML mail with Outlook

Postby Bengt » Fri Aug 29, 2014 10:44 pm

It didn't work. An E-mail was created with a body text consisting of first an empty line and then a line with <html></html>. Text format was plain text.

/Bengt
Bengt
 
Posts: 89
Joined: Fri Jan 27, 2006 5:29 pm

Re: HTML mail with Outlook

Postby IDEAL Software Support » Sat Aug 30, 2014 6:11 pm

Did you force VPE to use Extended MAPI?

We have tested it, and it works (code for the VPE DLL):
Code: Select all
VpeSetMAPIType(hDoc, VMAPI_TYPE_EXTENDED);
VpeSetMailText(hDoc, "<html></html>");


You can also format with full HTML, like the following:
Code: Select all
VpeSetMAPIType(hDoc, VMAPI_TYPE_EXTENDED);
VpeSetMailText(hDoc, "<html><body><span style='font-size:10.0pt;font-family:Arial;color:red'>Body <b>fat <i>italic</i></span> fat</b> text</body></html>");
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Re: HTML mail with Outlook

Postby Bengt » Mon Sep 01, 2014 10:50 pm

I cannot find VpeSetMAPIType in my VPE DLL Reference. Is that a new function? I use VPE 6.1 professional.

Regards
Bengt
Bengt
 
Posts: 89
Joined: Fri Jan 27, 2006 5:29 pm

Re: HTML mail with Outlook

Postby IDEAL Software Support » Tue Sep 02, 2014 1:11 pm

Yes, it requires VPE v7.0 - as I wrote in my first post. I recommend you download the v7.0 trial version and see if it works with your configuration. The v7.0 trial version can be installed safely side-by-side with VPE v6.10. Except service releases, each new version can be installed side-by-side to other versions.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Re: HTML mail with Outlook

Postby Bengt » Tue Sep 02, 2014 10:56 pm

Unfortunately, it is not so easy. I use VPE in a Visual Dataflex program with VPE4VDF from StarZen. For testing the new functions, I need an upgraded version of VPE4VDF and I am not sure that StarZen has done that and it is always very difficult to get into contact with them. Anyway, I'll try go get it.

Bengt
Bengt
 
Posts: 89
Joined: Fri Jan 27, 2006 5:29 pm

Re: HTML mail with Outlook

Postby IDEAL Software Support » Wed Sep 03, 2014 9:05 am

If you have access to the source code of VPE4VDF, it should be easy to add the changes from v6.10 to v7.0.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 17 guests

cron