i want to send email to the userid defined in the app email widget
but the do only has two choices
- use NO ‘to’ value, and email sent to logged on userid
- 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!");