Hi guys,
anyone know if there's a way to change and customize Alert Mail format ?
Regards
No Erocla
Mail Format [SOLVED]
- TJ
- Posts: 7746
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2225 times
Re: Mail Format
Please give a bit more detail on what you want to do?Hi guys,
anyone know if there's a way to change and customize Alert Mail format ?
Regards
No Erocla
Re: Mail Format
Thank you for reply tj.
if you write in Signal: Alert("HELLO");
you will receive this mail format:
29.01.2016 14:00:05
Source: System
Instrument: ESTX50
Resolution: 1 Hour
Price: 3'004.94
Message: HELLO
i would like to customize it deleting first 4 lines.
I would like to find a way to start new line too, for example:
Message: HELLO
I'AM
NO EROCLA
Hope to be more clear.
Thank you again
Regards
No erocla
if you write in Signal: Alert("HELLO");
you will receive this mail format:
29.01.2016 14:00:05
Source: System
Instrument: ESTX50
Resolution: 1 Hour
Price: 3'004.94
Message: HELLO
i would like to customize it deleting first 4 lines.
I would like to find a way to start new line too, for example:
Message: HELLO
I'AM
NO EROCLA
Hope to be more clear.
Thank you again
Regards
No erocla
- TJ
- Posts: 7746
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2225 times
Re: Mail Format
The information in the first 4 lines are important... you won't know the value until you have multiple indicators blasting at you.
To add a new line, use either of the following:
NEWLINE
\n
To add a new line, use either of the following:
NEWLINE
\n
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Mail Format
Nope. You'll need to use a DLL if you want to create custom email messages.I'm not interested in this 4 lines, do you know if there s a way to delete them ?
-
- Posts: 4
- Joined: 13 Sep 2013
- Location: The Netherlands
- Has thanked: 1 time
- Been thanked: 1 time
Re: Mail Format
Hello no erocla,
I just found this other approach on StackOverflow, it might work. I haven't tried it yet though.
then you don't have to use Alerts.
http://stackoverflow.com/questions/1028 ... ail-vb-net
jaanie
I just found this other approach on StackOverflow, it might work. I haven't tried it yet though.
then you don't have to use Alerts.
http://stackoverflow.com/questions/1028 ... ail-vb-net
jaanie
Code: Select all
using System.Net.Mail;
using System.Text;
public MailMessage mail;
{
sb = new StringBuilder();
sb.AppendLine("price ");
sb.Insert(1, StrategyInfo.AvgEntryPrice);
MailMessage mail = new MailMessage("my_mailaddress@gmail.com", "my_mailaddress@gmail.com");
SmtpClient mailclient = new SmtpClient();
mailclient.Port = 465;
mailclient.DeliveryMethod = SmtpDeliveryMethod.Network;
mailclient.UseDefaultCredentials = false;
mailclient.Host = "smtp.gmail.com";
mailclient.EnableSsl = true;
mailclient.Timeout = 10000;
mail.Subject = "bought some shares";
mail.Body = sb.ToString();
mailclient.Credentials = new System.Net.NetworkCredential("my_mailaddress@gmail.com","password");
mailclient.Send(mail);
}
-
- Posts: 4
- Joined: 13 Sep 2013
- Location: The Netherlands
- Has thanked: 1 time
- Been thanked: 1 time
Re: Mail Format
Hello No Erocla
I did not realize you are using the standard MC version. The solution i gave is only useful in MC.Net.
I am sorry. I guess JoshM is right. You will probably have to make a dll.
Best of luck,
jaanie
I did not realize you are using the standard MC version. The solution i gave is only useful in MC.Net.
I am sorry. I guess JoshM is right. You will probably have to make a dll.
Best of luck,
jaanie