Send a HTML site by email? - html

It is possible to send an entire site (that has only 1 image, a logo) via mail?, the workflow would be:
user opens the mail
user sees the attachment "html" file
user clicks the attachment, the browser opens.
I have no idea if this is possible.
Another thing, this has to work on mobile, iOS more precisely.
Until now we were sending interactive pdfs to the users, but now we want to include iOS users as well, so this strategy could work, if it works of course.
And unfortunately, no, I can't send a link to a website, it has to work this way, for reasons that are beyond my decision.

You have three options:
Send a link to your website.
Send the mail with an attachment of the HTML of your website. (since it is simple, you said just 1 image and logo it can fit in one HTML file).
Send an HTML formatted email, where you display the image and the logo.
If you want it to work on mobile, just use media querys for it to change styles depending on widht and height of the device.

Related

HTML Attachments opened in Apple device not showing some images

I am wondering if someone can help me with a problem I am encountering with iPhone/iPad. I have an email the generates a report as an HTML attachment. In that HTML attachment, there are two images. One is a static image that pulls down a logo using a normal HTML img tag.
The other is dynamic. It also uses the normal HTML img tag, however it calls out to a web api with some information identifying the user.
<img src="http://MyApiServerName.com/api/User/{id}/{OtherParm}" >
The Web API uses information on the user to return appropriate images to them. For some reason the dynamic image does not show up with the attachment is opened on an iPad/iPhone.
The image works just fine when the attachment is opened from a computer. I thought maybe something might be blocking images, however then I would expect the static image not to display as well. I verified that the "Load Remote Images" setting is turned on.
I am at a loss here. Is there something with iOS that prevents dynamically generated images from showing in HTML attachments?
Thanks
Ok, I can't explain why the above is not working, but I did find something that does. Instead of using the following URL
<img src="http://MyApiServerName.com/api/User/{id}/{OtherParm}" >
use
<img src="http://MyApiServerName.com/api/User/{id}/{OtherParm.jpg}/" >
The final param needs to end with ".jpg/". If the slash is not there, you will get a 404 error.
Then in the API method, you simply strip off the .jpg part of "OtherParm" to get the intended value for "OtherParm".

How to include image in html email

In our WCF app, there is a method to send an html formatted email. I am using StringBuilder to build the html.
I am including an image in the email. When the app sends the email, the email is formatted correctly. However, the image doesn't display unless the user right clicks and selects "Download the Image".
Is there a way to have the image automatically display in the html email without the user having to select download image?
Here is my image tag:
<img src='http://www.MySite.com/Images/Mylogo.png' border='0' />
This is intentional behavior of the email client, there's no way to guarantee that the image will automatically show for all clients. You're going to have to live with that. In fact, some people prefer to read email in plain text.
If the image is relatively small, you might consider attaching it to the email instead. You'd have a better chance of having it displayed by default, though there are obviously other costs.

Convert Site with messenger to work like facebook

Hello I'm creating a site at the moment (asp.net mvc) which has a div at the bottom side of the page that works as a messenger.
I would like to find a way to make the site work like facebook's chat. In other words, when a user clicks on a link on the site to load the content on the back however the messenger to stay in tact without loading again.
Will I have to change the site so every page is loaded with an ajax request? Also, I don't want to use iframes.
The only way to have elements to stay on screen from page to page without using iframes to use ajax requests, something like load() if you're uisng jQuery.
Most sites that do it use some variation of hashbangs, so a page can be loaded by directly entering it's url, rather than necessitating a path through other pages.
To do what you propose has fundamental implications to the structure of the entire site, so if this messenger box isn't anything more than a gimmick, I wouldn't bother. I'd even go so far as to say that if you're not sure how you'd do this one thing, you shouldn't be trying to build a site around it.
Well if you dont want your chat to disappear even for a moment with full site refresh, then yes, you have to change your page to ajax loading. It is not such a pain as it looks - for example use jquery to intercept all clicks on anchors, make ajax call to their href, and replace some "all-wrapping" placeholder div with the returned content.. Not very pretty usage of ajax, but it works, and your chat stays in place.

Dynamically updating Images to Facebook Page

I want to dynamically update the three images from "Trend Alert" in the EDM below:
http://sophiehart.createsend4.com/t/ViewEmail/r/D3501506593F4120/5AA0D88279FE59B738A555EB6E97B45B
To this Facebook iFrame.
http://www.facebook.com/apps/application.php?id=198582036826535&sk=app_198582036826535
I'm hoping someone knows a way to update these automagically - I don't want to have to manually change them every week.
The problem as you can see is that the EDM above spits out a different dynamic link every week.
Any one worked on something similar to this before?
This Facebook page currently features the same technique (The Latest section) - so if anyone can shed some light on it that would be great!
http://www.facebook.com/rachelzoe
EDIT: I've created the html email template and have got the iframe working - but i'm unsure how to link the images to the Facebook as the link to the html email (campaign monitor) will change weekly?
LINK to EDM: http://sophiehart.createsend4.com/t/ViewEmail/r/D3501506593F4120/5AA0D88279FE59B738A555EB6E97B45B
LINK TO FB: http://www.facebook.com/apps/application.php?id=198582036826535&sk=app_198582036826535
You can create a Facebook Application and install it as a tab in your client's Facebook Page. This tab will render an iframe with content from any URL that you specify. This way, you can do anything you want with your webpage (e.g. display 3 dynamic images), and it will be embedded in your client's Facebook Page.

monotouch: Image not displaying in email

I have some html that has an image in a table. The table displays fine in a UIWebView. I take that same html and send it in an email (using MFMailComposeViewController). The code snippet to build the html is:
html += "<tr><td><img src=\"reading.png\" align=left></td><td>"
The table is created properly, but the image just has a question mark in a blue box. (Obviously, it can't find the image, but why?)
How do I fix this?
The path "reading.png" is not found, that is the reason why you do not see the image.
There are in fact several potential solutions.
1) put the image to the web URL something like http://yourweb address.com/reading.png, this works well and will show, all the clients supports this and user just need to click to "show images" if he/she has it disabled by default in the email client.
2) second solution is to put the specific image representation to the img tag, you can do so by opening the file, reading its content and adding it as base64 data to the src of the img, there are plenty of samples for this.
3) third is to add it as attachment to the email. Again plenty of samples here and on the web how to do that.
Conversion of the sample code from ObjectiveC is simple to Monotouch.
Hope this helps.