Friday 27 September 2013

send fake email using python smtplib library


Hi All,

Today we will learn how can we send a fake email from any email account using python .

we are using python library smtplib which will call machine's smtp server and it will send email from provided From email .
While using ubuntu you can use postfix as smtp server .


import smtplib
To ="91prashantgaur@gmail.com"
Subject = "Test Fake Email "
Message  = "Hi How are you  ?"
Email = 'test@gmail.com'            # from this email id we will send email 
server = smtplib.SMTP('localhost')        # local smtp server of machine
Message = string.join(("From: %s" % Email,
                                   "To: %s" % To,
                                   "Subject: %s" % Subject,
                                  "",
                                  Message
                                  ),"\r\n")
server.sendmail(Email , [To], Message)
server.quit()

If any question let me know at  91prashantgaur@gmail.com


Prashant Gaur
Python/JavaScript Developer
9717353657

5 comments:

  1. Replies
    1. Have you tried this? Can you receive the email?

      Delete
  2. cannot get it in my gmail. Do you know why?

    ReplyDelete
  3. Can you tell me error you are getting ?? or please configure smtp correctly .i can see receive email while using this

    ReplyDelete
  4. This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article. Buy Fake IDs

    ReplyDelete