You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.
How would you specify that option when sending an email - I can of course hardcode it into your proton-mail.js module, but is there a way to specify the option without rewriting your code when sending emails?
Many thanks - great project.
---- FOLLOW UP ----
I just found this doc: file:///Users/master/code/protonmail-api/docs/ProtonMail.html
Does that mean the following code would solve the above issue?
Quick question: how do I specify "config.puppeteerOpts puppeteer launch options"
If you were to use a Tor proxy to launch the puppeteer as such:
"const browser = await puppeteer.launch({headless:true, args: ['--proxy-server=socks5://127.0.0.1:9050','--no-sandbox', '--disable-setuid-sandbox']})"
How would you specify that option when sending an email - I can of course hardcode it into your proton-mail.js module, but is there a way to specify the option without rewriting your code when sending emails?
Many thanks - great project.
---- FOLLOW UP ----
I just found this doc: file:///Users/master/code/protonmail-api/docs/ProtonMail.html
Does that mean the following code would solve the above issue?
const ProtonMail = require('protonmail-api');
(async () => {
const pm = await ProtonMail.connect({
username: '[email protected]',
password: 'somethingsecure',
puppeteerOpts: {args: ['--proxy-server=socks5://127.0.0.1:9050','--no-sandbox', '--disable-setuid-sandbox']}
})
await pm.sendEmail({
to: '[email protected]',
subject: 'Send email tutorial',
body: 'Hello world'
})
pm.close()
})()
ANSWER: Yes this is how it works. I tested it by modifying the proton-mail.js as follows:
if (this._browser === undefined) {
// console.log(typeof this._config.puppeteerOpts)
this._browser = await puppeteer.launch({ headless: false, ...this._config.puppeteerOpts })
this._page = await this._browser.newPage()
}
This opens the Chromium browser with your IP and the IP is a Tor IP.
The text was updated successfully, but these errors were encountered: