Skip to content
Embedded World – Anything about Embedded Systems design and development
  • About
  • Embedded
  • Android
  • Project Ideas
    • Embedded Projects
    • MATLAB Projects
    • DSP Projects
  • Search Parts
  • Web

SIM900 GPRS EMAIL AT Commands

November 3, 2022July 12, 2024 Blog

Watch this video if you want to see the live demo,

 

Before you begin make sure your SIM900 GSM module has acquired the network and it is ringing when you make a call to it. Then test the basic AT commands and then proceed further.

Once you are ready, you can start by first setting up the GPRS connection as follows, 


Text in RED is typed by me and text in GREEN is the response from SIM900 module.

 Setting up GPRS connection

Set the connection type to GPRS

AT+SAPBR=3,1,”Contype”,”GPRS”

OK

 

Set the APN to to “www” since i am using a Vodafone SIM card, It might be different for you, and depends on the network

AT+SAPBR=3,1,”APN”,”www”

OK

 

Enable the GPRS

AT+SAPBR =1,1

OK

 

Query if the connection is setup properly, if we get back a IP address then we can proceed

AT+SAPBR=2,1

+SAPBR: 1,1,”100.120.204.132″

OK

 


Sending a email to using SMTP protocol

Here in this demonstration i will be using email account NON SSL settings and credentials i got from my web server cPanel as shown below,

 

Before we begin we need to have the following information for sending email using SIM900 module.

  • Receivers email address – ([email protected], [email protected], [email protected])
  • Senders email address – ([email protected])
  • Senders email password – (pass123)
  • Outgoing SMTP server address – (mail.marsinnovations.in)
  • Outgoing SMTP server address port number – (25)

 

 

Start by setting up the Email bearer profile identifier

AT+EMAILCID=1

OK

 

Set the timeout value within which you will enter the email data to be sent, Here i have set it to 30 seconds

AT+EMAILTO=30

OK

 

Set the SMTP server address and port number

AT+SMTPSRV=”mail.marsinnovations.in”,25

OK

 

Set the email authentication information 

AT+SMTPAUTH=1,”[email protected]”,”pass123″

 OK

 

Set the senders email address and Name

AT+SMTPFROM=”[email protected]”,”Test”

OK

 

Set the To email address and Name

 

AT+SMTPRCPT=0,0,”[email protected]”,”Ravi”

OK

 

Set the Cc email address and Name

 

AT+SMTPRCPT=1,0,”[email protected]”,”Ravi”

 

OK

 

Set the Bcc email address and Name

 

AT+SMTPRCPT=2,0,”[email protected]”,”Ravi”

 

 

OK

 

Set the email Subject, You can set whatever you want. I have set it as MySubject

AT+SMTPSUB=”MySubject”

 

OK

 

Time to enter the email content. Enter the below command and you will get a > prompt after which you should type content and press Ctrl+Z when you are done or send 0x1A hex character.

AT+SMTPBODY 

> Hello Ravi How are you..fgbmklbgk….

 

OK

 

Send the email by entering the below command, if you get  the URC +SMTPSEND: 1 then email is successfully sent

AT+SMTPSEND

 

OK

+SMTPSEND: 1

 

Now check your receiver email Inbox and you should find the email with text “Hello Ravi How are you..fgbmklbgk….”  

Hope it helps someone. 

 

Also see:

  • SIM900 DTMF commands
  • SIM900 GPRS HTTP AT Commands
  • SIM900 & SIM908 GSM module – Autobaud rate [Solution]
  • SIM900 SMS and Call Commands
  • SIM900 / SIM800 USSD Code AT Commands – Working example

Post navigation

Previous: Designing a Low cost OBD II 3G/2G GPS Tracker – Part 1
Next: Learn, Why you should choose a GNSS module over a GPS module?

Recent Posts

  • 5G deployment opportunities for developers
  • Designing optimized embedded systems
  • Microcontroller testing and game tactics
  • Choosing the right gsm module for IoT
  • Evolution of GSM and 5G communication
Copyright © 2022 Valetron Systems