How to support HTML mail in a diffbackend?

Add new and modify functionalities to Z-push

How to support HTML mail in a diffbackend?

Postby ajc » Fri Jun 08, 2012 7:34 pm

Hey everyone,

I'm still merrily hacking away at a diffbackend, and of course all I'm able to do so far is ugly old plain text email.

What is the correct and preferred way to deliver HTML email in a diffbackend on Z-Push 2?

I'm using the current trunk. I googled for some examples of what others are trying, but the examples I found all use out of date API.

Is there an official way to do HTML email, or will the code require modification? If so, can someone point me where to start? (I've signed the contributor agreement and will submit the changes if I need to make them.)

Thanks!
ajc
 
Posts: 8
Joined: Sat May 26, 2012 10:45 pm
Location: New Castle, NY, USA

Re: How to support HTML mail in a diffbackend?

Postby mku » Wed Jun 13, 2012 2:24 pm

Hi ajc,

take a look at setMessageBodyForType function in mapiprovider.php of the Zarafa backend. The part in
Code: Select all
if (Request::GetProtocolVersion() >= 12.0) {
is what you need to set the message body. The rest is then done by Z-Push libraries.

Greets, Manfred
Try using forum search as well!
Please do not PN me asking for support. Use the forum instead. Thank you.
mku
Site Admin
 
Posts: 1239
Joined: Thu Sep 20, 2007 4:48 pm
Location: Belo Horizonte / Brazil

Re: How to support HTML mail in a diffbackend?

Postby ajc » Wed Jun 13, 2012 9:38 pm

Does that mean that HTML mail is not supported by ActiveSync protocol versions <12.0 ? Is that a limitation of ActiveSync itself, or of Z-Push?
ajc
 
Posts: 8
Joined: Sat May 26, 2012 10:45 pm
Location: New Castle, NY, USA

Re: How to support HTML mail in a diffbackend?

Postby mku » Thu Jun 14, 2012 4:13 pm

Hi ajc,

it's a limitation of ActiveSync. Only devices which request the full RFC-822 message with SYNC_BODYPREFERENCE_MIME (e.g. iPhones and some android devices) are able to display html emails with ActiveSync version 2.5.

Greets, Manfred
Try using forum search as well!
Please do not PN me asking for support. Use the forum instead. Thank you.
mku
Site Admin
 
Posts: 1239
Joined: Thu Sep 20, 2007 4:48 pm
Location: Belo Horizonte / Brazil

Re: How to support HTML mail in a diffbackend?

Postby ajc » Wed Oct 17, 2012 4:38 am

I did some experimentation, and determined that if I set $output->mimedata to the full RFC822 message, $output->mimedata to 0, and $output->mimesize to the length of $output->mimesize, I get HTML mail display on my Android without having to make any special requests in my backend.

Is it true that if the message contains inline images, some clients (Apple) will extract them from the RFC822, while others (Android) will look for them in the attachment chain? In the latter case, how does it reference them? By their cid?
ajc
 
Posts: 8
Joined: Sat May 26, 2012 10:45 pm
Location: New Castle, NY, USA

Re: How to support HTML mail in a diffbackend?

Postby fmbiete » Wed Oct 17, 2012 1:33 pm

Hi ajc,

Attachments are referenced at server by the attname (2.5) or filereference (12+).
Inside the message, cid is used

I'm working in adding support ASV12+ to the IMAP backend.
Currently it's working pretty fine (MIME format for iOS, HTML/TXT format for Android).
If interested, you can get a copy here :D (I'm using Z-Push 2.0.4 in that branch)
https://github.com/fmbiete/PHP-Push-2/tree/imap_asv12

Regards
---
Francisco Miguel Biete
fmbiete
 
Posts: 99
Joined: Wed Sep 26, 2012 3:57 pm


Return to Developer Board

Who is online

Users browsing this forum: No registered users and 1 guest

cron