loading

I'm trying to make smtp protocol using my mcu & ethernet(W5500)

Step 1: SMTP(Simple Mail Transfer Protocol)

There are 3 steps for sending e-mail

  1. Establish TCP session with SMTP server (3way handshaking)
  2. Response & Requset SMTP Command
  3. Close the session

SMTP link:

Step 2: Meterials.

Just used W5500-EVB(Ethernet evaluation board) for sending e-mail.

  • mcu: LPC11E36(CM0) included in W5500-EVB
  • etc: MAC address
  • ethernet: W5500

W5500 wiki page: http://wizwiki.net/wiki/doku.php?id=products:w5500:start

Tools

  • software: LPCxpresso
  • downloader: Flash magic
  • etc: Hercules(Serial terminal) for debug

Step 3: Software

There are 8 functions for send e-mail but you can use 2 functions for use it.

1. SendMail()

  • server = SMTP server address
  • from = your full e-mail address (ex: abcd@eee.com)
  • pwd = password
  • to[] = receiver e-mail address
  • cc[] = receiver e-mail address(carbon copy)
  • subject = subject
  • body = body
  • auth = you can choose 2 options between 'SMTP_AUTH_NONE' and 'SMTP_AUTH_PLAIN'
  • FileAttached = if you want to send some files, you cans choose a option instead of 'FILE_DISABLE'

2. AttachFile()

  • filename = file name (ex: abc.txt)
  • filebody = file body
  • filetype = ZIP, TXT, JPG, BIN
  • Used sntp.h for getting the time.

** I'll upload the entire source code at github and write link after modified a bit

Step 4: Results

I was able to confirm that the CC and txt File arrives.

<p>Good Job!!!</p>
<p>Nice!</p>

About This Instructable

364views

1favorite

License:

More by wpgnss:Easy way to drink more water every day. You can turn on the TV at ANY TIME. Simple preventive system. 
Add instructable to: