Alternative for twilio and mailgun for sms and mail alert

Instead of using others services to recieve sms and mail alerts can we build our own application to receive sms and mail for free forever. Have anyone of you have built such application .
then please tell me how can I build such applications.


As per our research, twilio and mailgun are the best and easiest 3rd party applications to use for the purpose of sending SMS and email.

For email, you can try exploring the SMTP library of python. It helps you to send email without the involvement of a third party application.

You can create a code something like this:

import smtplib

def sendEmail (to, content):
server = smtplib.SMTP(‘’,587)
server.login(‘Your_email_id’, ‘Your_password’)
server.sendmail(‘Your email_id’, to, content)

print(“What is the subject?”)
subject = input()
print(‘What should I say?’)
message = input()
content = ‘Subject: {}\n\n{}’.format(subject, message)
to = “Recipient’s_email_id”
sendEmail(to, content)
print(“Email has been sent!”)
except Exception as e:
print(“Sorry, can’t process your request at this moment”)

I’ve created a project where I trigger an email alert using the same above concept in Ubuntu, have a look to get a clear idea-