url string is lot to type into browser' address fieldof coursebut it might be useful if generated automatically by another script as we saw in and the module urllib request can then be used to submit such url string to the server from within python program example - shows one way to automate this example - pp \internet\web\pymailcgi\sendurl py ""###################################################################send email by building url like this from inputsoneditpagesend py?site=smtp rmi netfrom=lutz@rmi netto=lutz@rmi netsubject=test+urltext=hello+mark;this+is+mark ###################################################################""from urllib request import urlopen from urllib parse import quote_plus url 'url +'?site=%squote_plus(input('site>')url +'&from=%squote_plus(input('from>')url +'&to=%squote_plus(input('to >')url +'&subject=%squote_plus(input('subj>')url +'&text=%squote_plus(input('text>')or input loop print('reply html:'print(urlopen(urlread(decode()confirmation or error page html running this script from the system command line is yet another way to send an email message--this timeby contacting our cgi script on web server machine to do all the work the script sendurl py runs on any machine with python and socketslets us input mail parameters interactivelyand invokes another python script that lives on possibly remote machine it prints html returned by our cgi scriptc:\pp \internet\web\pymailcgisendurl py site>smtpout secureserver net from>pp @learning-python com to >lutz@learning-python com subj>testing sendurl py text>but sirit' only wafer-thin reply htmlpymailcgiconfirmation page (pp epymailcgi confirmation send mail operation was successful press the link below to return to the main page < href="<img src=/pythonpoweredsmall gifalign=left alt="[python logo]border= hspace= the pymailcgi server