Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 626103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:22:56+00:00 2026-05-13T19:22:56+00:00

My data provider allows me to access mails on my phone, but not internet.

  • 0

My data provider allows me to access mails on my phone, but not internet.
I am thinking of writing a utility to fetch a webpage through e-mail, so that I can get view webpages on my phone while I’m travelling. The idea is to have a service running on my system (running outlook and connected to exchange server)which waits for a ‘query mail’ which has the web address as subject. This service should fetch the webpage and reply with the html content.

Please suggest ways as to how I can implement this efficiently. Is there any utility available which does the same?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:22:56+00:00Added an answer on May 13, 2026 at 7:22 pm

    It’s rather simple to do using system CDO dll. I already has a working prototype, just drop a mail to site2email@gmail.com and you will receive an answer with embedded webpage (in case of url was provided in subject) or attached web archive (mht file with all resources included) in case of url sent in the mail’s body.
    Here is a quick and dirty code snippet you can play with:

        private void ConvertAndSend(string emailTo,Uri url)
        {
            try
            {
                string mimeType;
                string charset;
                if (NetworkUtils.UrlExists(url.AbsoluteUri,out mimeType,out charset))
                {
                    if (mimeType.Equals("text/html",StringComparison.OrdinalIgnoreCase))
                        SendUrlToEmail(url.AbsoluteUri,emailTo,charset);
                    else
                    {
                        string fileName = Path.GetFileName(url.AbsoluteUri);
                        string extension = GetExtensionByMimeType(mimeType);
                        if (String.IsNullOrEmpty(fileName)
                            || fileName.Length > 200)
                            fileName = DateTime.Now.ToString("yyyyMMddHHmmss");
                        if (!Path.GetExtension(fileName).Equals(extension
                            ,StringComparison.OrdinalIgnoreCase))
                            fileName += extension;
                        string tempFolder = Path.Combine(Server.MapPath("App_Data")
                            ,"TempFiles");
                        if (!Directory.Exists(tempFolder))
                            Directory.CreateDirectory(tempFolder);
                        fileName = Path.Combine(tempFolder,fileName);
                        new WebClient().DownloadFile(url.AbsoluteUri,fileName);
                        SendMessage(emailTo,url.AbsoluteUri,Path.GetFileName(fileName),fileName);
                    }
                }
                else
                {
                    throw new WebException("Requiested address is not available at the moment.");
                }
            }
            catch (Exception ex)
            {
                SendMessage(emailTo,url.AbsoluteUri,ex.Message,null);
            }
        }
    
        public void SendUrlToEmail(string url
            ,string emailTo
            ,string charset)
        {
            Encoding encFrom;
            try { encFrom = Encoding.GetEncoding(charset); }
            catch { encFrom = Encoding.UTF8; }
            CDO.Message msg = null;
            ADODB.Stream stm = null;
            try
            {
                msg = new CDO.MessageClass();
                msg.MimeFormatted = true;
                msg.CreateMHTMLBody(url
                    ,CDO.CdoMHTMLFlags.cdoSuppressNone
                    ,string.Empty
                    ,string.Empty);
                //msg.HTMLBodyPart.Fields["urn:schemas:mailheader:Content-Language"].Value = "ru";
                msg.HTMLBodyPart.Fields["urn:schemas:mailheader:charset"].Value = "Cp" + encFrom.CodePage;
                msg.HTMLBodyPart.Fields["urn:schemas:mailheader:content-type"].Value = "text/html; charset=" + charset;
                msg.HTMLBodyPart.Fields.Update();
                msg.HTMLBody = documentBody;
                msg.Subject = url;
                msg.From = Params.Username;
                msg.To = emailTo;
                msg.Configuration.Fields[GmailMessage.SMTP_SERVER].Value = SmtpServer;
                msg.Configuration.Fields[GmailMessage.SEND_USING].Value = 2;
                msg.Configuration.Fields.Update();
                msg.Send();
            }
            finally
            {
                if (stm != null)
                {
                    stm.Close();
                    Marshal.ReleaseComObject(stm);
                }
                if (msg != null)
                    Marshal.ReleaseComObject(msg);
            }
        }
    

    NetworkUtils.UrlExists is a small method that send HEAD and then if it fail GET request to determine type and encoding of the content.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use Oracle's specific data provider (11g), not the Microsoft provider that is being
I'm writing a web and Android app that allows users to store and access
How can we ensure that certain applications are not able to access my data
From a Service Provider standpoint, how would you go about 'permanent' access to data?
The data provider (ArrayCollection) for my data grid consists of objects with ByteArray (int)
Using C# and Oracle Data Provider for .NET (ODP) I made a long query
I have an ADO.NET Managed Data Provider that is registered in machine.config in DbProviderFactory
I'm looking for a third-party Oracle Data Provider for .Net (ADO.NET) with a full
In our current project we are interfacing with a third party data provider. They
Why am I getting Unable to find the requested .Net Framework Data Provider when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.