Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I <iframe> Gmail?

Tags:

I know that Gmail might put some security measures in place to prevent this, but I really need to put Gmail inside an element.

The two following methods don't work:

<object type='text/html' data='http://mail.google.com/'></object>

<iframe src='http://mail.google.com/' frameborder=0 style='width:322px; height:480px;'></iframe>

Are there any other ways?

like image 697
Nicholas Avatar asked Jul 24 '10 13:07

Nicholas


People also ask

Can I use iframe in Gmail?

/cloudHQ Apps / Gmail Email Templates / cloudHQ Apps / HTML Editor for Gmail / Can I embed my iframe into an email? Unfortunately, iframes aren't currently supported by most email providers and iframes typically don't work in email. This is because email doesn't function the same as a web page.

How do I use Google iframe?

You can solve using Google CSE (Custom Searche Engine), which can be easily inserted into an iframe. You can create your own search engine, that search selected sites or also in entire Google's database. The results can be styled as you prefer, also similar to Google style. Google CSE works with web and images search.


2 Answers

You cannot. GMail, like most of Google's other web services, sets the HTTP header:

X-Frame-Options: SAMEORIGIN

which disallows their site from being framed by any site other than GMail itself.

like image 146
2 revs, 2 users 73% Avatar answered Nov 06 '22 00:11

2 revs, 2 users 73%


You would be better off using Google API. http://code.google.com/appengine/docs/python/mail/

Although not a solution to your question I believe this is an appropriate alternative.

like image 23
Chris Avatar answered Nov 06 '22 02:11

Chris