Send email to string defined in email widget

i want to send email to the userid defined in the app email widget

but the do only has two choices

  1. use NO ‘to’ value, and email sent to logged on userid
  2. use hard coded string for the ‘to’ address…

i could use option 2, if I could figure out how to GET the string as defined in the app.

it would be nice if there was a 3rd option… use the widget defined string…

did I miss something?

looks like the doc wording is confusing… the app is registered to me, but I want email to someone else…
they are NOT the ‘logged on user’

the example shows to the user defined in the app

from the doc’

Email widget allows you to send email from your hardware to any address.

Example code:

Blynk.email("my_email@example.com", "Subject", "Your message goes here");
It also contains to field. With this field you may define receiver of email in the app. **You may skip to field when you want to send email to your Blynk app login email:**

 Blynk.email("Subject", "Your message goes here");
You can send either text/html or text/plain (some clients don’t support text/html) email. You can change this content type of email in the Mail widget settings.

Additionally you may use {DEVICE_NAME}, {DEVICE_OWNER_EMAIL} and {VENDOR_EMAIL} (for the local server) placeholders in the mail for the to, subject and body fields:

Blynk.email("{DEVICE_OWNER_EMAIL}", "{DEVICE_NAME} : Alarm", "Your {DEVICE_NAME} has critical error!");

You can create a variable on your hardware and use the text input widget to input the new required email address

1 Like

thanks… the email widget works as expected, but the doc is unclear…

its work? how pls?

Emails won’t work at all if you are using a Blynk library version that contains “beta” in its name. You should be using version 0.6.1

If that doesn’t solve your problems then I’d suggest that you start a new topic “need help with my project” and provide all of the requested information about your particular issue.

Pete.