One way to do it would be to send all your mail to an account on a service (such as Googlemail) which allows you to set rules such as:
- if message subject contains "Order Opened" or "Order Closed", "fan out" the message to user1,user2,user3
- if message subject contains "Error", send the message to the email/SMS gateway.
CB
// MAILLINK // http://www.fx1.net/maillink.php // // Please note: importing functions must be enabled // inside MT4 Terminal to be able to use functions // from addons like here. // // Demonstration code // Sends simple email // importing functions from .dll #import "maillink.dll" int MailInit(string,int,string,string); int MailAddHeader(int,string); int MailResetHeader(int); int MailSend(int,string,string,string,string); string MailVersion(); string MailErrorString(int); int MailClose(int); #import int start() { int smtp = MailInit("smtp.provider.com",25,"yourlogin","yourpassword"); if (smtp>0) { // success MailAddHeader(smtp,"Reply-To: noreply@test.com"); MailAddHeader(smtp,"CC: secretary@test.com"); MailAddHeader(smtp,"X-Symbol: "+Symbol()); // edit these settings to your smtp int ret = MailSend(smtp,"mt4@domain.com","your@domain.com","This is subject" ,"And this is\nmultilined\nbody.\nHave fun"); if (ret == 0 ) { Print ("Successfully sent."); } else { Print ("Error in sending. See debug: "+MailErrorString(smtp)); } } return(0); }
How do I do this as there is only one email address input in the MT4? Is my EA able to change that email address set at the MT4?
did you try to add multiple adresses separated by a comma?
like this:
foo@example.com, bar@example.com, foobaz@example.com
(I have not tested this but it would be the first thing I would try since multiple addresses separated by comma it is a valid syntax for the SMTP protocol)
[edit:] forget my answer, I didn't read your question.
And of course, there are a number of ways around this.
CB
You can program it by using different words (variables) in the subject. For example you say to the mailbox filter:
if the subject consist 'The sun is shining' forward it to the sunshine@gmail.com
else forward the mail to the cloudy@gmail.com
I was careless. Sorry!
maillink.dll
Where can I get "maillink.dll"
Cant download it, is there another location for download the dll ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I set the email destination to one account, e.g. to my hotmail account.
When a certain case happens, I want to send to another email account (which is pointed to an email-to-sms service, which will end up as an sms to me).
How do I do this as there is only one email address input in the MT4? Is my EA able to change that email address set at the MT4?