Welcome, Guest

Author Topic: [SOLVED] Send e-mail using pic-web  (Read 2630 times)

pf1991

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
[SOLVED] Send e-mail using pic-web
« on: December 24, 2014, 01:35:18 AM »
Hi! I was trying to send an email to my gmail account using the PIC-WEB but i am always getting an error.

I connected the pic-web to my router via ethernet and i am abble to access it via Wi-Fi. Now i would like to send an email using the prebuilt softw provided but until now i had no success.

There are anyone who could help me? How i should configure my board?
I tried also to change the static email 'from' located in the code but it didnt worked...

CONFIGURATIONS USED

SMTP server: smtp.gmail.com
username: my gmail email
password: my gmail pass
port: i tryed 25, 465, 587

config:
Microchip TCP/IP Config Application (v5.42, Dec 23 2014)

        1: Change serial number:                1
        2: Change host name:                    PIC-WEB
        3: Change static IP address:            192.168.1.10
        4: Change static gateway address:       192.168.1.254
        5: Change static subnet mask:           255.255.255.0
        6: Change static primary DNS server:    192.168.1.254
        7: Change static secondary DNS server:  0.0.0.0
        8: Enable DHCP & IP Gleaning:           DHCP is currently disabled
        9: Download MPFS image.
        0: Save & Quit.
Enter a menu choice: 0
Settings saved.
« Last Edit: December 30, 2014, 03:39:16 AM by pf1991 »

MBR

  • Sr. Member
  • ****
  • Posts: 256
  • Karma: +19/-0
Re: Send e-mail using pic-web
« Reply #1 on: December 24, 2014, 06:43:49 AM »
Does your internet provider allow to access directly SMTP servers on internet? Some block the SMTP protocol (unless it's via their SMTP severs) to avoid zombified client PCs to send spam.

BTW, the optimal way to diagnose this kind of errors is to use a packet sniffer (e.g. tcpdump and/or Wireshark), the only problem is that dumb (unmanaged) switches, including the built-in ones in SOHO routers, don't have monitor ports, so unless you have a smart switch, you will need an old hub or software bridge (made from two bridged NICs on a PC). Or you can runt sniffer directly on the router itsefl (e.g. on the OpenWRT ones).

pf1991

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Send e-mail using pic-web
« Reply #2 on: December 27, 2014, 01:20:37 AM »
Thanks for your answer :)

You were right, my internet provider was blocking smtp by default. After enabling the smtp on my internet configuration i was able to send e-mails using my google account on thunderbird (before i couldn't), but i am still unable to send an e-mail using the default demo of olimex...

I don't have any hub to analyse the packages... Well, i will continue to try to find out what is going wrong with this.

pf1991

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Send e-mail using pic-web
« Reply #3 on: December 30, 2014, 03:38:46 AM »
I made it :)

1 - unblock the smtp service (POrt 25) that my ISP was blocking in the online account of the service
2 - get an email that didn't use ssl security (pic18 doesn't support because ssl will use its all ram) to test

the problem was persisting so,
3 - connect the board to my laptop via Ethernet, share the Internet connection(Wi-fi) of the laptop to the Ethernet connection and analyze the connection using wireshark at the Ethernet interface. With this i found the source of the error. I was sending the username and the passwork and the server was refusing the connection because it wasn't needed.

It was really difficult to find an email provider that didn't use ssl(pic18 doesn't support), and i waste a lot of time trying to set up a local email server at my network in order to be able to analyze the interface with wireshark. Sharing the internet connection to the ethernet port was much more simple! :)