thank you i have been studying this technique since the afternoon starting from zero but i did not give up and i did. All thanks to your video explaining everything
Hi, I wonder if its possible to self-host email server on esp32 kind of board, didn't you try it? I mean not to send email to existing gmail email server, but receive - say you have static ip address and bought domain name - does esp32 have enough ram to host email server so I can connect to it later with bluetooth and get those emails?..
Interesting project idea! I have only used it as a mail relay as i don't have a SD module. I think you would want the storage unless you are only holding small mail messages. You can write to the file system with FS, tinyFS or SPIFFS (those are the ones I have used, I bet there are more). If you try this, can you send me a link to the code? :)
@@dash9computing Sorry, I'm not very familiar with esp's, I'm currently making other thing on rp2040, and not sure will have time for such experiments at the time). My interest comes from dumb idea I have to host all my emails in a smartwatch with lte e-sim internet - so that all your emails and passwords are always on your wrist.
Ah, sorry! I have the ESP32 on the brain! I think it is a cool idea. The memory capacity will be the issue. If you are thinking of building a smart watch the SD expansion might make it bulky.
@@dash9computing yeah, sure. Although I guess micro sd SDIO card reader I used is like 2 mb 3 mm in height, not that much. I even saw some watches with sd cards for lte
Hello, thank you for sharing your video. Could you help me with my code? This example only send the email in setup, so it's only once. How would I add a sensor and get an email from a triggered? I added 'initiating smtp connection and send message' codes to the loop, the program compiled but would not send any email. Could you advise? Thank you in advance.
My last reply may have been interrupted....just in case... void loop(){ // Read the sensor value and store it in a variable int sensorValue = analogRead(A0); // Check if the sensor value is above a certain threshold if(sensorValue > 500){ // Declare the session config data ESP_Mail_Session session; // Set the session config session.server.host_name = SMTP_HOST; session.server.port = SMTP_PORT; session.login.email = AUTHOR_EMAIL; session.login.password = AUTHOR_PASSWORD; session.login.user_domain = ""; // Declare the message class SMTP_Message message; // Set the message headers message.sender.name = "ESP"; message.sender.email = AUTHOR_EMAIL; message.subject = "ESP Test Email"; message.addRecipient("Ben", RECIPIENT_EMAIL); // Send HTML message String htmlMsg = "Hello Ben!- Sent from ESP32-S2 board"; message.html.content = htmlMsg.c_str(); message.html.transfer_encoding = Content_Transfer_Encoding::enc_7bit; // Connect to server with the session config if (!smtp.connect(&session)) return; // Start sending Email and close the session if (!MailClient.sendMail(&smtp, &message)) tft.println("Error sending Email, " + smtp.errorReason()); } // Delay for a short time before checking the sensor again delay(1000); }
Done with only 5 new lines of code... #include #include ezButton button(8); // create ezButton object that attach to pin 22; ___________________________________________________ void setup() { start: // GoTo Label Name button.loop(); // MUST call the loop() function first int btnState = button.getState(); Serial.println(btnState); if (btnState == 1) // Checks to see if Circuit is open { goto start; // If not open (closed circuit) and continue } // Note: close loop by connecting A5 (pin 8) to GRD ground _________________________________________________________ /* Start sending Email and close the session */ if (!MailClient.sendMail(&smtp, &message)) tft.println("Error sending Email, " + smtp.errorReason()); goto start; // This will loop back up and restart process } void loop(){ //Add Ben // turn on backlite@@dash9computing
I want to trigger the e-mail to be sent based on an event in which a normally closed circuit is in it's open state. For example, every time my mailbox is opened once a day, the closed circuit is broken and becomes in an open state. I'm a bit of a newbee, so if you could please tell me the code I need and exactly where it goes in the sketch. I also need to know which pins to attach the circuit to. So sorry, I'm just getting started in this.
Thanks for sharing this. I have been working on a project using esp-now, and Callmebot. I was originally going to use an email to SMS, but but is was too complicated. The Callmebot sends a message to my phone via Signal when my garage door opens.
Glad it was helpful! I like the sound of your project. Have you posted it anywhere? I have never used Callmebot but I want to now! If anyone else is interested I think this is useful: www.callmebot.com/blog/free-api-whatsapp-messages/
@@dash9computing I haven't got it working the way I would like it, so not yet available to the public. Callmebot works for Signal, Telegram + whatsapp. Message usually arrives in less than ten seconds
thank you i have been studying this technique since the afternoon starting from zero but i did not give up and i did. All thanks to your video explaining everything
Great job! I am so glad my video helped. Isn't it a great feeling when you get something like this working? :)
Hi, I wonder if its possible to self-host email server on esp32 kind of board, didn't you try it? I mean not to send email to existing gmail email server, but receive - say you have static ip address and bought domain name - does esp32 have enough ram to host email server so I can connect to it later with bluetooth and get those emails?..
Interesting project idea! I have only used it as a mail relay as i don't have a SD module. I think you would want the storage unless you are only holding small mail messages. You can write to the file system with FS, tinyFS or SPIFFS (those are the ones I have used, I bet there are more). If you try this, can you send me a link to the code? :)
@@dash9computing Sorry, I'm not very familiar with esp's, I'm currently making other thing on rp2040, and not sure will have time for such experiments at the time). My interest comes from dumb idea I have to host all my emails in a smartwatch with lte e-sim internet - so that all your emails and passwords are always on your wrist.
Ah, sorry! I have the ESP32 on the brain! I think it is a cool idea. The memory capacity will be the issue. If you are thinking of building a smart watch the SD expansion might make it bulky.
@@dash9computing yeah, sure. Although I guess micro sd SDIO card reader I used is like 2 mb 3 mm in height, not that much. I even saw some watches with sd cards for lte
It sure would be nice to have that storage. I had a Liligo T-Watch 2020 v3 (ESP32 based). It was a little thick with the case but not bad.
Hello, thank you for sharing your video. Could you help me with my code? This example only send the email in setup, so it's only once. How would I add a sensor and get an email from a triggered? I added 'initiating smtp connection and send message' codes to the loop, the program compiled but would not send any email. Could you advise? Thank you in advance.
My last reply may have been interrupted....just in case...
void loop(){
// Read the sensor value and store it in a variable
int sensorValue = analogRead(A0);
// Check if the sensor value is above a certain threshold
if(sensorValue > 500){
// Declare the session config data
ESP_Mail_Session session;
// Set the session config
session.server.host_name = SMTP_HOST;
session.server.port = SMTP_PORT;
session.login.email = AUTHOR_EMAIL;
session.login.password = AUTHOR_PASSWORD;
session.login.user_domain = "";
// Declare the message class
SMTP_Message message;
// Set the message headers
message.sender.name = "ESP";
message.sender.email = AUTHOR_EMAIL;
message.subject = "ESP Test Email";
message.addRecipient("Ben", RECIPIENT_EMAIL);
// Send HTML message
String htmlMsg = "Hello Ben!- Sent from ESP32-S2 board";
message.html.content = htmlMsg.c_str();
message.html.transfer_encoding = Content_Transfer_Encoding::enc_7bit;
// Connect to server with the session config
if (!smtp.connect(&session))
return;
// Start sending Email and close the session
if (!MailClient.sendMail(&smtp, &message))
tft.println("Error sending Email, " + smtp.errorReason());
}
// Delay for a short time before checking the sensor again
delay(1000);
}
@@dash9computing Oh so we put the entire setup in the loop; and also in the setup?. Thank you so much. I'll give it a try and check back.
Done with only 5 new lines of code...
#include
#include
ezButton button(8); // create ezButton object that attach to pin 22;
___________________________________________________
void setup()
{
start: // GoTo Label Name
button.loop(); // MUST call the loop() function first
int btnState = button.getState();
Serial.println(btnState);
if (btnState == 1) // Checks to see if Circuit is open
{
goto start; // If not open (closed circuit) and continue
} // Note: close loop by connecting A5 (pin 8) to GRD ground
_________________________________________________________
/* Start sending Email and close the session */
if (!MailClient.sendMail(&smtp, &message))
tft.println("Error sending Email, " + smtp.errorReason());
goto start; // This will loop back up and restart process
}
void loop(){
//Add Ben
// turn on backlite@@dash9computing
I want to trigger the e-mail to be sent based on an event in which a normally closed circuit is in it's open state. For example, every time my mailbox is opened once a day, the closed circuit is broken and becomes in an open state. I'm a bit of a newbee, so if you could please tell me the code I need and exactly where it goes in the sketch. I also need to know which pins to attach the circuit to. So sorry, I'm just getting started in this.
Maybe I could accomplish more simply the same goal by setting up a relay that will power on the device when the mailbox is opened?
I figured it out by myself... Did it without setting up a relay as mentioned before. Anyone wanting to know how, please ask.
Hi, sorry I didn't reply! Glad you figured it out!
getting a device with esp32 on it and it looks like fun!
It is a cool/cheap way to hack around!
Thanks for sharing this. I have been working on a project using esp-now, and Callmebot. I was originally going to use an email to SMS, but but is was too complicated. The Callmebot sends a message to my phone via Signal when my garage door opens.
Glad it was helpful! I like the sound of your project. Have you posted it anywhere?
I have never used Callmebot but I want to now! If anyone else is interested I think this is useful:
www.callmebot.com/blog/free-api-whatsapp-messages/
@@dash9computing I haven't got it working the way I would like it, so not yet available to the public. Callmebot works for Signal, Telegram + whatsapp. Message usually arrives in less than ten seconds