Blynk two address email

Hi

i have created in my project one button for sending email, but i wanted send a two address
my code function for one address

Blockquote
BLYNK_WRITE(V90) {
if (param.asInt() == 1){
Blynk.email(“xxxxxxxx@gmail.com”, “*** HELP!!! ***”, “XXXXXXXXXXXX”);
}
}

i search in this community and is possible whit insert CC address … example please?!

you can forward specific mails

https://www.gadgetsnow.com/how-to/how-to-automatically-forward-gmail-messages-to-another-account/articleshow/62769914.cms

Looking at the documentation, it doesn’t appear that CC’s are allowed. You are limited to one email per 5 seconds, so why not simply start a timeout timer and send a second email to the second email address 5 seconds later?

Pete.

1 Like

Not tried the e-mail widget but maybe try to separate with a comma (like standard mail program):

Blynk.email("address_1@gmail.com,address_2@gmail.com", “*** HELP!!! ***”, “XXXXXXXXXXXX”);
1 Like

helppppp!!

BLYNK_WRITE(V90) {
if (param.asInt() == 1){
Blynk.email("libertinom@gmail.com", “*** HELP!!! ***”, “Ho di bisogno , chiama !!!”);
}
else
timer.setTimeout(6000L,{

    Blynk.email("lmsrl@outlook.com", "*** HELP!!!!! ***", "Ho di bisogno , chiama !!!!");  
    });

}

is correct?

BLYNK_WRITE(V90) { // push mode
Blynk.email("libertinom@gmail.com", “*** HELP!!! ***”, “Ho di bisogno , chiama !!!”);
timer.setTimeout(6000L, []() {  // Lambda Timer Function  wait 6 sec
    Blynk.email("lmsrl@outlook.com", "*** HELP!!!!! ***", "Ho di bisogno , chiama !!!!");  
    });
}
1 Like

now send two email at first address …

Are you sure your V90 is in push mode , not switch mode ?

yes push mode

I just tried,
we must debounce the button or become speedy gonzales

try that, that works like a charm for me, in switch mode

BLYNK_WRITE(V90) { // switch mode
  Blynk.virtualWrite(V90,LOW);
    Serial.println("sending 1");
    Blynk.email("xxxxxx@gmail.com", "*** HELP!!! ***", "Salut1 !!!");
    timer.setTimeout(6000L, []() {  // Lambda Timer Function  wait 6 sec
      Serial.println("sending 2");
      Blynk.email("xxxxxxxx@outlook.com", "*** HELP!!! ***", "Salut2 !!!");
    });
}
1 Like

That works well on the serial monitor…
but I can’t send 2 mails with local server :
15:44:18.026 ERROR- Error sending email from hardware. From user admin@blynk.cc, to : **************@outllok.com . Reason : 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/?p=BadCredentials t198sm18312165wmt.2 - gsmtp

:rofl::rofl::rofl::rofl:

maybe someone knows how to have more than one email in mail.properties :smile:

1 Like

Maybe change this to outlook.com?

Pete.

1 Like

yes, it was just a digital dyslexic, but with my 2 real mails, it does not work. :rofl:

Have you set correctly your own email provider settings?

Edit: and allowing less secure apps?:

1 Like

yes, it works well with the first mail, not with the second,
that’s why we need to know if we can have 2 mail addresses in the mail.properties

I know, I know :wink:

1 Like

send always two mail at first address, not read the second address …

if created a another button with second mail V91 ,
blynk push one button for two Vpin (V90+V91), it’s possible?

weird !!
yes you can use 2 virtual buttons,
but , has I said, we can use only one adress, because of the mail.properties
maybe you have blynk cloud ?

Make sure you remove the email address from the “to” line, else the email will ONLY go to that instead of what is in code :wink:

1 Like