Does Transcrypt support smtplib?

77 views Asked by At

I need smtplib and other libs is it possible to use Transcrypt for that purpose?

import os
import telebot
import smtplib
import textwrap
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication

transcrypt -m -b -n .\my-prog.py

Import error, can't find any of: ./email/mime/application/MIMEApplication.py

1

There are 1 answers

0
fzzylogic On BEST ANSWER

The short answer is no, for example see Main differences with CPython:

Web batteries: Seamless access to any existing JavaScript library has been favored over inclusion of many Python libraries in the distribution. There are some exceptions to this rule, e.g. math, cmath, random, itertools, re, time, datetime and turtle, and some more may follow, but in general the accent is on libraries that are relevant in the browser.

To send email from a browser, you'll probably call a third party service using ajax as in these stackoverflow answers.

To do so from the server side, instead of using js compiled from python in node, you would probably prefer to use python directly.