Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (2)

Powered by Vanilla. Made with Bootstrap.
How to use the SMTP python module.
  • Flashlight
    Posts: 173
    Ok so today i am going to teach you about the smtplib of python

    For all of you who don't know what smtp is http://en.wikipedia.org/wiki/Smtp

    So here we go.

    import smtplib

    This code above is the most important code. It imports the smtplib and allows you to use it.

    user=raw_input(\"What is your username for the mail server? \")

    This gets the username to use for sending the email.

    pass=raw_input(\"What is your password for the mail server? \")

    This gets the password to use to connect to the mail server.

    address=raw_input(\"Who do you want to send an email to? \")

    This is the receiver of the email.

    message=raw_input(\"What is your message? \")

    This is the message content.

    smtpserv= raw_input(\"What is your server and port( format as follows smtp.gmail.com:587)? \")

    This is the server your client will use. It is best that the user sets there own smtp server as they change a lot.

    mailserver= smtplib.SMTP(smtpserv)

    This sets the mail server, so mailserver means the smtp server you are using.

    mailserver.starttls()

    This starts transparent layer security which provides security for communications.

    mailserver.login(user,pass)

    The one above is pretty self explanatory but as this is a tutorial. This logs you into the smtp server with the "user and pass" credentials.

    mailserver.sendmail(user, address, message)

    This sends the mail to the recipient.

    mailserver.quit()

    This exits the connection between the client and the server.

    This module can be exploited by making an "Email Bomber".
    This can be done but i will let you discover how to do that to prevent leeching.

    Hope you guys understand the smtp module better.
  • DizzY
    Posts: 155
    LOL, I thought smtp was only on like linux and VB.

    I might continue with python now.
  • chroniccommand
    Posts: 1,389
    said:


    LOL, I thought smtp was only on like linux and VB.

    I might continue with python now.



    ...Fail? I have to say I facepalmed but lol'ed at that. You sir, have made my sig.
  • DizzY
    Posts: 155
    I mean c++ and vb.

    Hahahahaha

    I'm changing my sig too: "iExploits Number 1 SKID"
  • chroniccommand
    Posts: 1,389
    said:


    I mean c++ and vb.

    Hahahahaha

    I'm changing my sig too: "iExploits Number 1 SKID"



    Would you like a user title to go along with that?
  • DizzY
    Posts: 155
    Well, is it true?
  • chroniccommand
    Posts: 1,389
    said:


    Well, is it true?



    Is what true?
  • DizzY
    Posts: 155
    Asif you put a typo in your signature. >.<
  • chroniccommand
    Posts: 1,389
    said:


    Asif you put a typo in your signature. >.<



    Lol no I didn't.
  • DizzY
    Posts: 155
    I corrected it just above even though it's not fully correct.

    I've got to learn somewhere...
  • Flashlight
    Posts: 173
    ok apart from DiZZy's uber fail anybody got any comments on the tutorial itself?
  • chroniccommand
    Posts: 1,389
    The tutorial was great keep them coming.
  • DizzY
    Posts: 155
    That's you chronic. xD
  • chroniccommand
    Posts: 1,389
    DOOOOOOOODZ I FOUND DizzY!

    NOTE: He's the piece of shit in the toilet
    LMAO.
  • Xin
    Posts: 3,251
    Keep those pictures to the funny images thread pleaes :)
    Xin
  • chroniccommand
    Posts: 1,389
    Daw... but the piece of shit was DizzY...