EA to send mail

 
Good day
Is there any one who can help with this code. I am trying to code the EA that will send email.  My problem is that when I compile it is giving me the error below.
int start()
   {
   double
   RSI_1h;
  {
//----
   RSI_1h=iRSI(NULL,PERIOD_H1,Period_RSI,PRICE_CLOSE,0);
//----
}
   
   if((RSI_1h>50) || (RSI_1h < 50))
      {
      int setup= SendMail(Symbol(),"Rsi crossing 50line");
      }
  return;
  }
Error 'SendMail' - function returns no result	C:\Program Files (x86)

 
SendMail does-not Return any value. So remove the [int setup=].
 
Velly123:

Error 'SendMail' - function returns no result	C:\Program Files (x86)
Read this to help you understand what return values are:  What are Function return values ? How do I use them ?
 
ubzen:
SendMail does-not Return any value. So remove the [int setup=].

Thank you its working.  I have one more question, when an EA sends an email does it send it for every tick?
 
RaptorUK:
Read this to help you understand what return values are:  What are Function return values ? How do I use them ?


Thank you the link is helpfull.
 
Velly123: Thank you its working.  I have one more question, when an EA sends an email does it send it for every tick? 
That depends on how you program the Conditions before SendMail. In the above code, pretty much yes_every tick.
Reason: