Help with Send Mail

 

Hi

I am trying to get an EA to send me an email message when it wants to trade. This will call the SendMail() function. The help says "Sends a message to the e-mail set in the Tools->Options->EMail tab."

My email is provided through charter.net so I put in

smtp server : smtp.charter.net

my login and password, and then I click test - but I get the error message

"Mail: Error connecting to smtp.charter.net"

Any help appreciated.

 

Codersguru helps

Hi

I found

http://www.metatrader.info/node/108

and I am trying to implement

Thanks codersguru

 

Help

I put 'gMail.mqh' in the folder ..\experts\include\ and compile it, no problem.

I put the 'SMail.dll' in the folder ..\experts\libraries\

I put sendMail.mqh in ..\experts\ and try compile it - but it gives the error 'gmail.mqh' -cannot open program file.

I tried the dll example they give in the experts\samples\ folder and it gave no hassles.

Do I have to register the dll with regsvr32 or something.

Any ideas?

 

Error found

In sendMail.mqh it says

#include

//this should rather be

#include

Then it all compiles - waiting to see if it will work when the market opens

 

Also need to change

Also, need to change the path of

string Attachmet = "D:\\....." to the proper path for the screen shots or it also fails.

Found that it works with Outlook express or Outlook - but outlook always gives the message asking if you want to allow the application to send the message - don't know how you switch that off. In Outlook express this is easily shut down. Then I guess one should have code that always changes the title - as Mcafee thinks its a potential worm sending mail with the same subject line.

Great code Codersguru.

 

Got this running, but I use Outlook (rather than Outlook Express) and I just don't have the Options in the http://www.metatrader.info/node/108 document. So I end up with the myriad of "someones trying to send out something", "is this OK", "are you sure?" etc.

Any ideas on how to disable these or use an alternative outroute for these e-mail alerts. Great idea, but it's not useful for me if I have to go through three screens to e-mail myself something.

Thanks.

 

I will look into this

Hi

I will look into this, but I get the same hassle when using it with 'Outlook'. So I have set 'Outlook express' to my default mail client. And set express to not download my mail from the server.

This works great if you have a machine set up just for trading - on the home computer that everyone is working on not so great.

Cheers

 

Hi all,

I've tried to use this sMail dll and it doesn't work for me. It passes a blank parameter for the "to" variable to my email client.

Anyone know or a similar problem or how to fix it?