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 8304115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:44:43+00:00 2026-06-08T17:44:43+00:00

I am trying to send and receive mail of known structure from a GMail

  • 0

I am trying to send and receive mail of known structure from a GMail account without user intervention.

Is there an elegant way to make IMAP and SMTP connections from a Firefox extension without overcomplicating things by involving C++ or Python?

  • 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-06-08T17:44:45+00:00Added an answer on June 8, 2026 at 5:44 pm

    You have to use nsISocketTransportService.createTransport() to open a connection, something like this:

    var Cc = Components.classes;
    var Ci = Components.interfaces;
    
    var socket = Cc["@mozilla.org/network/socket-transport-service;1"]
                   .getService(Ci.nsISocketTransportService)
                   .createTransport(["ssl"], 1, "pop.gmail.com", 995, null);
    
    var input = socket.openInputStream(Ci.nsITransport.OPEN_UNBUFFERED, 0, 0);
    var scriptableInput = Cc["@mozilla.org/scriptableinputstream;1"]
                            .createInstance(Ci.nsIScriptableInputStream);
    scriptableInput.init(input);
    
    
    var output = socket.openOutputStream(Ci.nsITransport.OPEN_UNBUFFERED, 0, 0);
    

    This gets you an input and output stream. You can receive data via nsIScriptableInputStream.read() and send it via nsIOutputStream.write(). But you would still have to implement IMAP/SMTP logic yourself (you cannot use the current implementation in Thunderbird at it is written in C++ and the new JavaScript-based implementation isn’t ready yet).

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

Sidebar

Related Questions

I am trying to develop the XMPP Gateway which can send/receive from standard XMPP
I'm trying to send a mail with PHPmailer and gmail. But when I send
I am trying to send sms amd mail together. There are no issues with
I am trying to figure out the best way to send emails from an
I'm trying to send and receive using pipes: send.cpp struct { long a; long
For about a year now, I've had problems trying to send and receive email
I'm trying perform a relatively basic TCP socket send/receive operation on Windows CE using
I am trying to receive an image from the Android Gallery via an ACTION_SEND
I`m trying to send simple html page with form data to user with GET,
[continued from Is there a way to tell whether two COM interface references point

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.