Blynk.email() not functioning

can someone help me,im still new with blynk, currently im doing a project using blynk notification and blynk email, however i dont know why I not receive email from dispatcher@blynk.io, but blynk notification functioning so this is my code


#include <WiFi.h>
#include <Wire.h>
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <SoftwareSerial.h>


#define trigPin 7
#define echoPin 5
#define BLYNK_PRINT Serial                          //#define EspSerial Serial1 for esp8266
#define ESP8266_BAUD 9600
#define BLYNK_MAX_SENDBYTES 256

SoftwareSerial EspSerial(2, 3);                     //blynk
ESP8266 wifi(&EspSerial);                          

char auth[] = "auth;   //authentication for blynk
char ssid[] = "ssid";     //wifi ssid
char pass[] = "pass";    //wifi password

int vibr_Pin =6;
float duration, distance; 

void setup() {
  Serial.begin(9600);    
EspSerial.begin(ESP8266_BAUD);
  delay(10);
  Blynk.begin(auth, wifi, ssid, pass);
  
  pinMode(trigPin, OUTPUT);                                  // PIN 7
  pinMode(echoPin, INPUT);                                   // PIN 5
 }
void loop() {

 digitalWrite(trigPin, HIGH);
  digitalWrite(trigPin, LOW);
  
  duration = pulseIn(echoPin, HIGH);
  distance = (duration / 2) * 0.0344;                  //TO CALCULATE THE MEASURMENET
 
      if (distance >= 7){                   //SET THE MEASURE IF MORE THAN 7CM, ITEMS MISSING
     Blynk.email("a@gmail.com", "Smart Vault alarm", "Door is open, items is missing!");                    // Blynk.notify to show this message on smartphone
     Blynk.notify ("door is open");
     Serial.println("missing ");
     
  }
      else {
      Serial.print("things is secure ");
      Serial.print(distance);
      Serial.print("  cm");
      Serial.println();
  }
    delay(1000);
   Blynk.run();
                                                             // 

I think you should probably start by reading this:

Do you have the email widget added to your app?
Have you checked your junk mail?

Pete.

1 Like

yes, i have email widget on my app, and yes i have checked my junk mail
ok i will read that first. thankyou

You may also want to look into flags. As once your “Door is open, items is missing!” you will be sending lots of emails and notifications (in your current set-up, 1 per second).

1 Like

i manage to get the email, but i found that after 100 mail, i cannot receive any more, is there any alternative instead of using local server?

If you’ve designed a system that is attempting to send you more than 100 emails per day then I’d question the value of that system.
No normal person is going to want to process 100 emails do notifications per day from an automated system.
In my view, the best approach to notifications is to adopt a “reporting by exception” approach, where an email or notification warns you of a critical event which requires immediate attention. If the system you are monitoring requires critical intervention more than a handful of times per week then there’s something fundamentally wrong with the underlying system and it’s that you should be focussing your energies on.

If you’re using this email data for another purpose, such as establishing a reporting system or audit trail, then there are much more appropriate ways of achieving the desired outcome.

Pete.

2 Likes